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
Super wx Problem Solver
Super wx Problem Solver
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 »

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 »

Hi,

I think you just need to link against the wx "adv" library
"Keyboard not detected. Press F1 to continue"
-- Windows
gururamnath
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath »

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: 672
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Post by briceandre »

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
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath »

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 »

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
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath »

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