FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Undefined symbol on compilling
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
scooterman



Joined: 06 Feb 2007
Posts: 10

PostPosted: Thu May 31, 2007 8:42 am    Post subject: Undefined symbol on compilling Reply with quote

Hello, I'm trying to compile dui on windows with dmd. The library is created correctly, but when I try to make the tests I get a load of symbol undefined errors. Both release 3 and svn code gave the same results. Here is a sample of my output:

obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk9Separator12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk5Scale12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk10HScrollbar12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk5Range12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk17FileChooserDialog12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk14ScrolledWindow12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk9ButtonBox12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk10HButtonBox12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk6Window12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D4glib6ListSG12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk3Box12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk4Idle12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk7Timeout12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk5Table12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk5Entry12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)
Error 42: Symbol Undefined _D3gtk11CheckButton12__ModuleInfoZ
obj\demos\gtkD\TestAspectFrame.obj(TestAspectFrame)

I have gtk+ runtime installed as well.
Any help would be apreciated Smile
Back to top
View user's profile Send private message
Ant



Joined: 06 Mar 2004
Posts: 306
Location: Canada

PostPosted: Thu May 31, 2007 9:01 am    Post subject: Re: Undefined symbol on compilling Reply with quote

scooterman wrote:
Hello, I'm trying to compile dui on windows with dmd. The library is created correctly, but when I try to make the tests I get a load of symbol undefined errors. Both release 3 and svn code gave the same results. Here is a sample of my output:


seems none of the gtkD symbols are found.
can you share your link command line?

Ant
Back to top
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Thu May 31, 2007 1:35 pm    Post subject: Reply with quote

Sounds like it's not finding the libs. Does dmd know where to look? did you try using the -I flag on the paths? Let us know!
Back to top
View user's profile Send private message
scooterman



Joined: 06 Feb 2007
Posts: 10

PostPosted: Sat Jun 02, 2007 11:07 am    Post subject: Reply with quote

Well, I was using the makeall.bat file. On my unix box everthing worked fine. I have to set any configuration to make it work in windows??

Thanks
Back to top
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Mon Jun 04, 2007 6:22 am    Post subject: Reply with quote

It should just work. Can we see your link command line? Also, did you try using the -I flag to import like I suggested?
Back to top
View user's profile Send private message
Nox / Lux



Joined: 07 Jun 2006
Posts: 18

PostPosted: Tue Jun 12, 2007 8:19 am    Post subject: Reply with quote

I have the same problem as the author of this thread. The output looks like this:

Code:

-------------- Build: Debug in CharBuild ---------------
Compiling: TreeClass.d
Compiling: helpers.d
Compiling: CharBuild.d
Linking console executable: bin\Debug\CharBuild.exe
C:\dmd\bin\..\..\dm\bin\link.exe obj\Debug\TreeClass+obj\Debug\helpers+obj\Debug\CharBuild,bin\Debug\CharBuild.exe,,C:\dmd\src\gtkD\gtkd.lib+phobos.lib+user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
   
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_text
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_attributes
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_markup
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_markup_with_mnemonic
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_pattern
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_justify
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_ellipsize
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_width_chars
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_max_width_chars
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_parse_uline
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_line_wrap
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_line_wrap_mode
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_layout_offsets
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_mnemonic_keyval
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_selectable
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_text
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_select_region
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_mnemonic_widget
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_selectable
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_text_with_mnemonic
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_attributes
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_justify
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_ellipsize
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_width_chars
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_max_width_chars
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_label
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_layout
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_line_wrap
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_line_wrap_mode
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_mnemonic_widget
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_selection_bounds
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_use_markup
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_use_underline
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_single_line_mode
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_get_angle
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_label
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_use_markup
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_use_underline
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_single_line_mode
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_angle
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_new
C:\dmd\src\gtkD\gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_new_with_mnemonic
C:\dmd\src\gtkD\gtkd.lib(GtkD)
 Error 42: Symbol Undefined _gtk_main_quit
C:\dmd\src\gtkD\gtkd.lib(GtkD)
 Error 42: Symbol Undefined _gtk_main
C:\dmd\src\gtkD\gtkd.lib(Window)
 Error 42: Symbol Undefined _gtk_window_new
C:\dmd\src\gtkD\gtkd.lib(Window)
 Error 42: Symbol Undefined _gtk_decorated_window_move_resize_window
C:\dmd\src\gtkD\gtkd.lib(Window)
 Error 42: Symbol Undefined _gtk_decorated_window_set_title
C:\dmd\src\gtkD\gtkd.lib(Window)
 Error 42: Symbol Undefined _gtk_decorated_window_calculate_frame_size
C:\dmd\src\gtkD\gtkd.lib(Window)
 Error 42: Symbol Undefined _gtk_decorated_window_init
Process terminated with status 1046 (0 minutes, 7 seconds)
50 errors, 0 warnings


Any ideas where I should begin troublshooting this?
Back to top
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Tue Jun 12, 2007 8:54 am    Post subject: Reply with quote

Like with the author, it sounds like it's not finding the libs. Try using the -I flag on the paths. What command are you using to compile/link?
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Tue Jun 12, 2007 10:27 am    Post subject: Reply with quote

Don't you need to link with a gtk+ lib? Passing -I won't help, as it's the linker which is failing.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Tue Jun 12, 2007 11:12 am    Post subject: Reply with quote

*looks again*

You're right! I didn't notice that it was failing with actually linking to the gtk+ libs. I just assumed he meant that he had the same problem as the author, like he said, which is that it couldn't find the gtkd lib.

Sorry, Carlos is correct.
Back to top
View user's profile Send private message
Nox / Lux



Joined: 07 Jun 2006
Posts: 18

PostPosted: Tue Jun 12, 2007 11:58 pm    Post subject: Reply with quote

Oh, sorry about that. I have not really understood the nature of the problem. I thought I'd follow the old tenet "better to post in an existing thread than start a new one". Bugger.

Does the linker need to find gtkd.lib only, or is it also required to find some of the actual gtk libs/dlls? Are the functions it complains about things that should be present in gtkd.lib, but are not?

By the way, I am using DMD 1.014, although I tried with 1.010 as well, with the same result.
Back to top
View user's profile Send private message
Nox / Lux



Joined: 07 Jun 2006
Posts: 18

PostPosted: Wed Jun 13, 2007 4:47 am    Post subject: Reply with quote

Addendum: I get the same errors as the author when running makeAll. If at all interesting, I have uploaded a log of makeAll.bat output here.


Hmm... Any ideas why it complains about missing symbols INSIDE the lib?

Code:

Linking console executable: bin\Debug\CharBuild.exe
C:\dmd\bin\..\..\dm\bin\link.exe obj\Debug\TreeClass+obj\Debug\helpers+obj\Debug\CharBuild,bin\Debug\CharBuild.exe,,phobos.lib+user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
   
gtkd.lib(Label)
 Error 42: Symbol Undefined _gtk_label_set_text
...

Do I need to make import libraries from the gtk .dlls?
Back to top
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Wed Jun 13, 2007 5:15 am    Post subject: Reply with quote

So it's creating your gtkd.lib file, but crashes when it tries to compile GtkDTests because the lib can't wrap the gtk dlls.

Where do you have the dlls installed? Do they have their entries in the registry? Currently, gtkD tries to find the location of the dlls in the registry, and if it can't, it defaults to C:\Program Files\Common Files\GTK\2.0\bin.

Let me know if that helps!
Back to top
View user's profile Send private message
Nox / Lux



Joined: 07 Jun 2006
Posts: 18

PostPosted: Wed Jun 13, 2007 8:35 am    Post subject: Reply with quote

Thanks for the feedback! Now, I have GTK here:
C:\Program Files\Common Files\GTK\2.0\bin\libgtk-win32-2.0-0.dll

So it should be alright I guess. I do not exactly know how the registry entries are supposed to be set up, but they ARE there. I uploaded the registry entry for GTK here.
Back to top
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Wed Jun 13, 2007 9:26 am    Post subject: Reply with quote

Ok, so your dlls are fine. It must be a problem in the compd script.

Do you have bud? If not, get it.

Save the following code as budGtkDTests.bat in your gtkD folder with the other scripts:

Code:

bud demos/gtkD/TestWindow.d -full -gui -O -TGtkDTests -Isrc;demos -clean


Run the script and you should be good to go. Let me know if that works so I know if I need to correct the compd scripts.
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Wed Jun 13, 2007 9:44 am    Post subject: Reply with quote

You have the dll, but the linker needs a lib. Use lib (it should be in your dmc bin directory) to create an import library from the dll. Then, pass that to dmd.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group