2.8.11 linker error in mac 10.6 when compiled as dynamic lib

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
gururamnath
Moderator
Moderator
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

2.8.11 linker error in mac 10.6 when compiled as dynamic lib

Post by gururamnath » Wed Oct 27, 2010 4:04 am

Hello,
I'm compiling the dynamic library that uses wxWidgets 2.8.11
in Mac 10.6 and I'm getting linker errors.

vtable for _TreeCtrlin treectrl.o
"wxGrid::GetClassInfo() const", referenced from:
vtable for _Gridin grid.o
"_wxEVT_GRID_CELL_RIGHT_DCLICK", referenced from:
_wxEVT_GRID_CELL_RIGHT_DCLICK$non_lazy_ptr in event.o
(maybe you meant: _wxEVT_GRID_CELL_RIGHT_DCLICK$non_lazy_ptr)

[almost all the wx functions is not linked]

When compiling wxSource, I used the following additional parameters

CFLAGS='-arch i386' LDFLAGS='-arch i386' CC='gcc -m32' CXX='g++ -m32'

and I used the same thing when compiling the project source but I'm getting linker errors. Does anyone know if I need to pass any additional parameters specifically in Mac 10.6 ? Please let me know.

Thanks,
Guru Kathiresan
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com

Code snippets for wxWidgets - http://wxsnippets.com

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Wed Oct 27, 2010 1:39 pm

Hi,

I think you just need to link against the wx "adv" library
"Keyboard not detected. Press F1 to continue"
-- Windows

gururamnath
Moderator
Moderator
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath » Thu Oct 28, 2010 1:48 am

Auria wrote:Hi,

I think you just need to link against the wx "adv" library
All the libraries are included in the makefile by calling the command "wx-config --libs".

Can anyone else let me know if they have found a solution for this issue ?

Ps: If anyone can find a solution, I can send $50 by paypal for your time.
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com

Code snippets for wxWidgets - http://wxsnippets.com

briceandre
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Post by briceandre » Thu Oct 28, 2010 12:59 pm

Can anyone else let me know if they have found a solution for this issue ?
The "Can anyone else" does not seem to be very fair for the person who tried to help you...

Not sure this will motivate other people :oops:

gururamnath
Moderator
Moderator
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath » Thu Oct 28, 2010 2:42 pm

briceandre wrote:
Can anyone else let me know if they have found a solution for this issue ?
The "Can anyone else" does not seem to be very fair for the person who tried to help you...

Not sure this will motivate other people :oops:
I did not mean to insult Auria. I was just looking to see if anyone else had this issue since I have already checked what Auria has suggested.
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com

Code snippets for wxWidgets - http://wxsnippets.com

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Thu Oct 28, 2010 2:56 pm

Maybe you could show the full link flags (and full build log)? Also, make sure wx-config --libs does include adv; also, you built wx as 32-bits, make sure whatever you're trying to build is 32-bits too, trying to build a 64 bits target will not link fine against a 32 bits wx
"Keyboard not detected. Press F1 to continue"
-- Windows

gururamnath
Moderator
Moderator
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath » Thu Oct 28, 2010 5:43 pm

It seems Mac OSX 10.6 already comes with 2.8 libraries and it is causing all the problems. I just removed all the existing library and rebuilt wx 2.8.11 from the scratch and everything seems to work fine.
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com

Code snippets for wxWidgets - http://wxsnippets.com

Post Reply