Discussion:
Building problem
Bert Wesarg
2010-05-21 18:52:39 UTC
Permalink
Maybe I have on the discussion list more luck.

Bert
Hi,
does anybody has any building problems lately?
I have really a strange problem. After installing Ubuntu 10.04 freshly
on my notebook, I can't run a self build nedit binary anymore. The
error message is;
Error: Shell widget nedit has zero width and/or height
   XtRealizeWidget(TheAppShell);
I have tried to reproduce this with a minimal X application (see
attached file), which showed the same error, but than suddenly stopped
to show this error.
Any help would be very appreciated.
Just curious, are you linking to Lesstif on OM?
I could reproduced this error with the appshell.c code without linking
to motif. Anyway I have only tested openmotif (self-build 2.3.2, 2.3.3
and ubuntu 2.2.3).

That looked like this (out from memory):

1. compile appshell.c without motif
2. run appshell
 -> Error: Shell widget appShell has zero width and/or height
3. compile appshell.c with motif (i.e. -DWITH_MOTIF and -lXm)
4. run appshell
 -> works as expected
5. compile appshell.c without motif
6. run appshell
 -> works as expected

So I assumed some "memory" from X that remembers some dimensions for
this app. This was on the weekend. Yesterday I tried it again and it
didn't work anymore. The appshell (w or w/o motif) always worked. Only
the self-build nedit does not.

Bert
Bert Wesarg
2010-05-26 21:27:48 UTC
Permalink
Post by Bert Wesarg
Maybe I have on the discussion list more luck.
Bert
Hi,
does anybody has any building problems lately?
I have really a strange problem. After installing Ubuntu 10.04 freshly
on my notebook, I can't run a self build nedit binary anymore. The
error message is;
Error: Shell widget nedit has zero width and/or height
   XtRealizeWidget(TheAppShell);
I have tried to reproduce this with a minimal X application (see
attached file), which showed the same error, but than suddenly stopped
to show this error.
Any help would be very appreciated.
Just curious, are you linking to Lesstif on OM?
I could reproduced this error with the appshell.c code without linking
to motif. Anyway I have only tested openmotif (self-build 2.3.2, 2.3.3
and ubuntu 2.2.3).
1. compile appshell.c without motif
2. run appshell
 -> Error: Shell widget appShell has zero width and/or height
3. compile appshell.c with motif (i.e. -DWITH_MOTIF and -lXm)
4. run appshell
 -> works as expected
5. compile appshell.c without motif
6. run appshell
 -> works as expected
So I assumed some "memory" from X that remembers some dimensions for
this app. This was on the weekend. Yesterday I tried it again and it
didn't work anymore. The appshell (w or w/o motif) always worked. Only
the self-build nedit does not.
The solution was vary simple: I had -lXm after -lXt in the
commandline, which must be in-front of it.
Post by Bert Wesarg
Bert
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
TK Soh
2010-05-27 01:10:23 UTC
Permalink
Post by Bert Wesarg
Post by Bert Wesarg
Maybe I have on the discussion list more luck.
Bert
Hi,
does anybody has any building problems lately?
I have really a strange problem. After installing Ubuntu 10.04 freshly
on my notebook, I can't run a self build nedit binary anymore. The
error message is;
Error: Shell widget nedit has zero width and/or height
   XtRealizeWidget(TheAppShell);
I have tried to reproduce this with a minimal X application (see
attached file), which showed the same error, but than suddenly stopped
to show this error.
Any help would be very appreciated.
Just curious, are you linking to Lesstif on OM?
I could reproduced this error with the appshell.c code without linking
to motif. Anyway I have only tested openmotif (self-build 2.3.2, 2.3.3
and ubuntu 2.2.3).
1. compile appshell.c without motif
2. run appshell
 -> Error: Shell widget appShell has zero width and/or height
3. compile appshell.c with motif (i.e. -DWITH_MOTIF and -lXm)
4. run appshell
 -> works as expected
5. compile appshell.c without motif
6. run appshell
 -> works as expected
So I assumed some "memory" from X that remembers some dimensions for
this app. This was on the weekend. Yesterday I tried it again and it
didn't work anymore. The appshell (w or w/o motif) always worked. Only
the self-build nedit does not.
The solution was vary simple: I had -lXm after -lXt in the
commandline, which must be in-front of it.
You mean you need to put Xm in front to solve the problem? Any guru
out there can share the reason why the order is significant?
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Bert Wesarg
2010-05-27 01:17:05 UTC
Permalink
Post by TK Soh
Post by Bert Wesarg
Post by Bert Wesarg
Maybe I have on the discussion list more luck.
Bert
Hi,
does anybody has any building problems lately?
I have really a strange problem. After installing Ubuntu 10.04 freshly
on my notebook, I can't run a self build nedit binary anymore. The
error message is;
Error: Shell widget nedit has zero width and/or height
   XtRealizeWidget(TheAppShell);
I have tried to reproduce this with a minimal X application (see
attached file), which showed the same error, but than suddenly stopped
to show this error.
Any help would be very appreciated.
Just curious, are you linking to Lesstif on OM?
I could reproduced this error with the appshell.c code without linking
to motif. Anyway I have only tested openmotif (self-build 2.3.2, 2.3.3
and ubuntu 2.2.3).
1. compile appshell.c without motif
2. run appshell
 -> Error: Shell widget appShell has zero width and/or height
3. compile appshell.c with motif (i.e. -DWITH_MOTIF and -lXm)
4. run appshell
 -> works as expected
5. compile appshell.c without motif
6. run appshell
 -> works as expected
So I assumed some "memory" from X that remembers some dimensions for
this app. This was on the weekend. Yesterday I tried it again and it
didn't work anymore. The appshell (w or w/o motif) always worked. Only
the self-build nedit does not.
The solution was vary simple: I had -lXm after -lXt in the
commandline, which must be in-front of it.
You mean you need to put Xm in front to solve the problem?
Yes. That solved my problem. Even without -lXm I could not execute a
simple Xt application.
Post by TK Soh
Any guru out there can share the reason why the order is significant?
My feeling is, that the toolkit library needs to be initialized before
Xt, or does overwrite some functions from the Xt lib.

Bert
Post by TK Soh
--
http://www.nedit.org/mailman/listinfo/discuss
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Dušan Peterc
2010-05-27 10:12:23 UTC
Permalink
Post by TK Soh
You mean you need to put Xm in front to solve the problem? Any guru
out there can share the reason why the order is significant?
I quote from "An introduction to GCC" by Brian J. Gough
http://www.network-theory.co.uk/gcc/intro/
A library which calls an external function defined in another library should
appear before the library containing the function.
Most current linkers will search all libraries, regardless of order, but
since some do not do this it is best to follow the convention of ordering
libraries from left to right.
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Continue reading on narkive:
Loading...