www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dwt compile problem

reply Ty Tower <tytower hotmail.com> writes:
Can anyone tell me what the linker is not finding here?
It seems to make the object OK but cant link

[tytower localhost misc]$ dmd ./hello.d
gcc hello.o -o hello -m32 -Xlinker -L/dmd/bin/../lib -lphobos -lpthread -lm
hello.o:(.data+0xac): undefined reference to `_D3dwt3all12__ModuleInfoZ'
hello.o: In function
`_D5hello5Hello4openMFC3dwt7widgets7display7DisplayZC3dwt7widgets5shell5Shell':
./hello.d:(.gnu.linkonce.t_D5hello5Hello4openMFC3dwt7widgets7display7DisplayZC3dwt7widget
5shell5Shell+0x11): undefined reference to `_D3dwt7widgets5shell5Shell7__ClassZ'
./hello.d:(.gnu.linkonce.t_D5hello5Hello4openMFC3dwt7widgets7display7DisplayZC3dwt7widget
5shell5Shell+0x1f): undefined reference to
`_D3dwt7widgets5shell5Shell5_ctorMFC3dwt7widgets7display7DisplayZC3dwt7widgets5shell5Shell'
hello.o: In function `_D5hello5Hello3runFZv':
./hello.d:(.gnu.linkonce.t_D5hello5Hello3runFZv+0x8): undefined reference to
`_D3dwt7widgets7display7Display10getDefaultFZC3dwt7widgets7display7Display'
hello.o: In function `_Dmain':
./hello.d:(.gnu.linkonce.t_Dmain+0x26): undefined reference to
`_D3dwt7widgets10messagebox10MessageBox11showMessageFAaAaC3dwt7widgets5shell5ShelliZi'
collect2: ld returned 1 exit status
--- errorlevel 1
Feb 04 2008
parent reply Jesse Phillips <jessekphillips gmail.com> writes:
On Mon, 04 Feb 2008 19:14:08 -0500, Ty Tower wrote:

 Can anyone tell me what the linker is not finding here? It seems to make
 the object OK but cant link
 
 [tytower localhost misc]$ dmd ./hello.d gcc hello.o -o hello -m32
 -Xlinker -L/dmd/bin/../lib -lphobos -lpthread -lm hello.o:(.data+0xac):
 undefined reference to `_D3dwt3all12__ModuleInfoZ' hello.o: In function
 
`_D5hello5Hello4openMFC3dwt7widgets7display7DisplayZC3dwt7widgets5shell5Shell':
 ./hello.d:
(.gnu.linkonce.t_D5hello5Hello4openMFC3dwt7widgets7display7DisplayZC3dwt7widgets5shell5Shell +0x11):
 undefined reference to `_D3dwt7widgets5shell5Shell7__ClassZ'
 ./hello.d:
(.gnu.linkonce.t_D5hello5Hello4openMFC3dwt7widgets7display7DisplayZC3dwt7widgets5shell5Shell +0x1f):
 undefined reference to
 
`_D3dwt7widgets5shell5Shell5_ctorMFC3dwt7widgets7display7DisplayZC3dwt7widgets5shell5Shell'
 hello.o: In function `_D5hello5Hello3runFZv':
 ./hello.d:(.gnu.linkonce.t_D5hello5Hello3runFZv+0x8): undefined
 reference to
 
`_D3dwt7widgets7display7Display10getDefaultFZC3dwt7widgets7display7Display'
 hello.o: In function `_Dmain':
 ./hello.d:(.gnu.linkonce.t_Dmain+0x26): undefined reference to
 
`_D3dwt7widgets10messagebox10MessageBox11showMessageFAaAaC3dwt7widgets5shell5ShelliZi'
 collect2: ld returned 1 exit status
 --- errorlevel 1
If your trying to compile a dwt project from the now dwt ports, you will have to install Tango first. As for the compiling command, there are a lot of libraries to reference. I use dsss for building and for a simple program this is the command it generates for rebuild: /usr/local/bin/rebuild -Idsss_imports/ -I. -S./ -I/home/he/d/include/d -S/home/he/d/lib/ -I/usr/local/include/d -S/usr/local/lib -I/home/he/d/ include/d -S/home/he/d/lib -oqdsss_objs/D -L-lgtk-x11-2.0 -L-lgdk- x11-2.0 -L-latk-1.0 -L-lgdk_pixbuf-2.0 -L-lgthread-2.0 -L-lm -L- lpangocairo-1.0 -L-lfontconfig -L-lXtst -L-lXext -L-lXrender -L-lXinerama -L-lXi -L-lXrandr -L-lXcursor -L-lXcomposite -L-lXdamage -L-lX11 -L- lXfixes -L-lpango-1.0 -L-lgobject-2.0 -L-lgmodule-2.0 -L-ldl -L-lglib-2.0 -L-lcairo -g -gc DrawingBoard.d -ofDrawingBoard So my suggestion would be to install dsss for building the projects. If you do you can switch the default in the rebuild configuration directory to dmd-posix-tango And the -dc= flag might let you change it on compile.
Feb 04 2008
next sibling parent reply Frank Benoit <keinfarbton googlemail.com> writes:
 From D3dwt7widgets5shell5Shell7__C => dwt.widgets.shell.Shell I see, 
that the module is lower case. So it is the DWT from Shawn Liu.
Feb 04 2008
parent Ty Tower <tytower hotmail.com.au> writes:
Frank Benoit Wrote:

  From D3dwt7widgets5shell5Shell7__C => dwt.widgets.shell.Shell I see, 
 that the module is lower case. So it is the DWT from Shawn Liu.
Yes Frank thanks but what do I need to change to get it to compile?
Feb 04 2008
prev sibling parent reply Ty Tower <tytower hotmail.com.au> writes:
Jesse Phillips Wrote:
 
 If your trying to compile a dwt project from the now dwt ports, you will 
 have to install Tango first. As for the compiling command, there are a 
 lot of libraries to reference. I use dsss for building and for a simple 
 program this is the command it generates for rebuild:
 
 /usr/local/bin/rebuild -Idsss_imports/ -I. -S./ -I/home/he/d/include/d 
 -S/home/he/d/lib/  -I/usr/local/include/d -S/usr/local/lib -I/home/he/d/
 include/d -S/home/he/d/lib  -oqdsss_objs/D -L-lgtk-x11-2.0 -L-lgdk-
 x11-2.0 -L-latk-1.0 -L-lgdk_pixbuf-2.0 -L-lgthread-2.0 -L-lm -L-
 lpangocairo-1.0 -L-lfontconfig -L-lXtst -L-lXext -L-lXrender -L-lXinerama 
 -L-lXi -L-lXrandr -L-lXcursor -L-lXcomposite -L-lXdamage -L-lX11 -L-
 lXfixes -L-lpango-1.0 -L-lgobject-2.0 -L-lgmodule-2.0 -L-ldl -L-lglib-2.0 
 -L-lcairo -g -gc DrawingBoard.d -ofDrawingBoard 
 
 So my suggestion would be to install dsss for building the projects. If 
 you do you can switch the default in the rebuild configuration directory 
 to dmd-posix-tango And the -dc= flag might let you change it on compile.
 If your trying to compile a dwt project from the now dwt ports, you will 
 have to install Tango first. As for the compiling command, there are a 
 lot of libraries to reference. I use dsss for building and for a simple 
 program this is the command it generates for rebuild:
 
 /usr/local/bin/rebuild -Idsss_imports/ -I. -S./ -I/home/he/d/include/d 
 -S/home/he/d/lib/  -I/usr/local/include/d -S/usr/local/lib -I/home/he/d/
 include/d -S/home/he/d/lib  -oqdsss_objs/D -L-lgtk-x11-2.0 -L-lgdk-
 x11-2.0 -L-latk-1.0 -L-lgdk_pixbuf-2.0 -L-lgthread-2.0 -L-lm -L-
 lpangocairo-1.0 -L-lfontconfig -L-lXtst -L-lXext -L-lXrender -L-lXinerama 
 -L-lXi -L-lXrandr -L-lXcursor -L-lXcomposite -L-lXdamage -L-lX11 -L-
 lXfixes -L-lpango-1.0 -L-lgobject-2.0 -L-lgmodule-2.0 -L-ldl -L-lglib-2.0 
 -L-lcairo -g -gc DrawingBoard.d -ofDrawingBoard 
 
 So my suggestion would be to install dsss for building the projects. If 
 you do you can switch the default in the rebuild configuration directory 
 to dmd-posix-tango And the -dc= flag might let you change it on compile.
Thanks Jesse, The compiler command is :- " [tytower localhost misc]$ dmd ./hello.d gcc hello.o -o hello -m32
 -Xlinker -L/dmd/bin/../lib -lphobos -lpthread -lm hello.o "  which builds the
object file OK
The problem seems to be in the linker The program downloaded as "DWT_for_D1.rar" and Frank mentions that in his post here Anything else you can tell me ?
Feb 04 2008
parent reply John Reimer <terminal.node gmail.com> writes:
Ty Tower wrote:
 Jesse Phillips Wrote:
  
 If your trying to compile a dwt project from the now dwt ports, you will 
 have to install Tango first. As for the compiling command, there are a 
 lot of libraries to reference. I use dsss for building and for a simple 
 program this is the command it generates for rebuild:

 /usr/local/bin/rebuild -Idsss_imports/ -I. -S./ -I/home/he/d/include/d 
 -S/home/he/d/lib/  -I/usr/local/include/d -S/usr/local/lib -I/home/he/d/
 include/d -S/home/he/d/lib  -oqdsss_objs/D -L-lgtk-x11-2.0 -L-lgdk-
 x11-2.0 -L-latk-1.0 -L-lgdk_pixbuf-2.0 -L-lgthread-2.0 -L-lm -L-
 lpangocairo-1.0 -L-lfontconfig -L-lXtst -L-lXext -L-lXrender -L-lXinerama 
 -L-lXi -L-lXrandr -L-lXcursor -L-lXcomposite -L-lXdamage -L-lX11 -L-
 lXfixes -L-lpango-1.0 -L-lgobject-2.0 -L-lgmodule-2.0 -L-ldl -L-lglib-2.0 
 -L-lcairo -g -gc DrawingBoard.d -ofDrawingBoard 

 So my suggestion would be to install dsss for building the projects. If 
 you do you can switch the default in the rebuild configuration directory 
 to dmd-posix-tango And the -dc= flag might let you change it on compile.
 If your trying to compile a dwt project from the now dwt ports, you will 
 have to install Tango first. As for the compiling command, there are a 
 lot of libraries to reference. I use dsss for building and for a simple 
 program this is the command it generates for rebuild:

 /usr/local/bin/rebuild -Idsss_imports/ -I. -S./ -I/home/he/d/include/d 
 -S/home/he/d/lib/  -I/usr/local/include/d -S/usr/local/lib -I/home/he/d/
 include/d -S/home/he/d/lib  -oqdsss_objs/D -L-lgtk-x11-2.0 -L-lgdk-
 x11-2.0 -L-latk-1.0 -L-lgdk_pixbuf-2.0 -L-lgthread-2.0 -L-lm -L-
 lpangocairo-1.0 -L-lfontconfig -L-lXtst -L-lXext -L-lXrender -L-lXinerama 
 -L-lXi -L-lXrandr -L-lXcursor -L-lXcomposite -L-lXdamage -L-lX11 -L-
 lXfixes -L-lpango-1.0 -L-lgobject-2.0 -L-lgmodule-2.0 -L-ldl -L-lglib-2.0 
 -L-lcairo -g -gc DrawingBoard.d -ofDrawingBoard 

 So my suggestion would be to install dsss for building the projects. If 
 you do you can switch the default in the rebuild configuration directory 
 to dmd-posix-tango And the -dc= flag might let you change it on compile.
Thanks Jesse, The compiler command is :- " [tytower localhost misc]$ dmd ./hello.d gcc hello.o -o hello -m32
 -Xlinker -L/dmd/bin/../lib -lphobos -lpthread -lm hello.o "  which builds the
object file OK
The problem seems to be in the linker The program downloaded as "DWT_for_D1.rar" and Frank mentions that in his post here Anything else you can tell me ?
I'm confused with what you are doing; it doesn't appear like you are are working on the windows platform here (unless this is mingw bash shell). Are you using Linux? If you are, dwt 3.02 does not work on linux at all. The old dwt is and always was win32-only. If you would like to try the new linux version (which is still alpha quality), please go here: www.dsource.org/projects/dwt-linux and follow the instructions for getting the source code (until we establish a system for packaging and serving it). Also, feel free to ask more questions and discuss dwt in general in the digitalmars.d.dwt forum, if you like. :) All the best, JJR
Feb 04 2008
parent reply Ty Tower <tytower hotmail.com.au> writes:
John Reimer Wrote:
 
 I'm confused with what you are doing; it doesn't appear like you are are 
       working on the windows platform here (unless this is mingw bash 
 shell).
 
 Are you using Linux? If you are, dwt 3.02 does not work on linux at all. 
   The old dwt is and always was win32-only.
 
 If you would like to try the new linux version (which is still alpha 
 quality), please go here:
 
 www.dsource.org/projects/dwt-linux
 
 and follow the instructions for getting the source code (until we 
 establish a system for packaging and serving it).
 
 Also, feel free to ask more questions and discuss dwt in general in the 
 digitalmars.d.dwt forum, if you like. :)
 
 All the best,
 
 JJR
John I am using Linux and I downloaded what appears to be a unix version as DWT_for_D1.rar . Now it may be a windows version ,I don't know. I can use either Tango or Phobos and am trying to compile each directories files in turn to get some sort of a widget type facility up and running for "D" use. Now I saw the Mercurial site but after learning http,ftp,cvs,subversion etc. etc. I am not keen to have to spend the time to learn another one. They seem to be coming out monthly with new systems. I'm 62 and I want to get on with my project !! Damn it I suppose I will have to go there . Don't know of an out of the box widget program for "D" do you? I can't find one working and useable for Linux
Feb 04 2008
parent reply John Reimer <terminal.node gmail.com> writes:
Ty Tower wrote:

 
 John I am using Linux and I downloaded what appears to be a unix version as
DWT_for_D1.rar  . Now it may be a windows version ,I don't know.
 
Yes, that is the windows-only dwt.
 I can use either Tango or Phobos and am trying to compile each directories
files in turn to get some sort of a widget type facility up and running for "D"
use.
 
Sorry, that won't work with the package you downloaded. :(
 Now I saw the Mercurial site but after learning http,ftp,cvs,subversion etc.
etc. I am not keen to have to spend the time to learn another one. They seem to
be coming out monthly with new systems. I'm 62 and I want to get on with my
project !!
 
I fully understand this and sympathize. We need to get things cleaned up. The DWT project is the process of a cleanup and reorganization to simplify (and unify) the whole DWT chain of projects.
 Damn it I suppose I will have to go there .
 
:( I'm sorry that it's not so easy at the moment; the new dwt is still early in it's development stage. The linux version is available, but it's likely not in a state that would meet your needs. Although we hope to make it so soon. :)
 Don't know of an out of the box widget program for "D" do you? I can't find
one working and useable for  Linux
 
 
GtkD (also on dsource) is available... It should build and install using dsss. You may like to try checking into wxD which is an wxWidgets binding for D: http://wxd.sourceforge.net/ It appears to be supported for windows, linux, and Mac OS X. Also have a look here for a list of different GUI libraries that are or were available for D: http://www.prowiki.org/wiki4d/wiki.cgi?GuiLibraries And... please keep an eye on dwt's status. If all goes well, it should turn into an exciting cross-platform tool for D GUI development. :) -JJR
Feb 04 2008
parent reply Ty Tower <tytower hotmail.com.au> writes:
Good stuff John

I attacked Mercurial -downloaded and compiled fine -used it to download dwt and
I have it but then downloaded dsss and now I am stuck trying to figure out how
to get dsss to configure ,make and install. 

When I work that out I will try config,make and install dwt and see how it goes
.
Will have a lookmat the others mentioned and I originally got the DWT from that
page as being unix 

Thanks Ty 
Feb 04 2008
parent John Reimer <terminal.node gmail.com> writes:
Ty Tower wrote:
 Good stuff John
 
 I attacked Mercurial -downloaded and compiled fine -used it to download dwt
and I have it but then downloaded dsss and now I am stuck trying to figure out
how to get dsss to configure ,make and install. 
 
 When I work that out I will try config,make and install dwt and see how it
goes .
 Will have a lookmat the others mentioned and I originally got the DWT from
that page as being unix 
 
 Thanks Ty 
Hmmm.... looks like we should add some dsss instructions to the wiki and the repository readme. In the meantime, feel free to ask any questions in the dwt newsgroup, if you need help. There's also the dwt IRC if you are interested. -JJR
Feb 05 2008