[wxMac 2.8.4] Got my code to compile, but not link

Robin Dunn robin at alldunn.com
Thu Jun 21 15:16:14 PDT 2007


David Goldsmith wrote:
> OK, my code is compiling, but not linking; the errors I'm getting are 
> Undefined symbols: wxOnAssert, wxDirExists, wxMessageBox, etc., etc.  So 
> obviously (?) I haven't told it the right  wx libraries to link against 
> and/or the right places to look for those libraries.  I found a bunch of 
> my wx libraries in /usr/local/lib/ and grep-ed to find which had 
> wxMessageBox (as a representative example) got libwx_macu_core-2.8.a 
> among the results, and hoped that including this with 
> -l/usr/local/lib/libwx_macu_core-2.8.a  would suffice, but no, I get 
> /usr/bin/ld: can't locate file for: 
> -l/usr/local/lib/libwx_macu_core-2.8.a despite:
> 
> $ ls /usr/local/lib/libwx_macu_core-2.8.a
> /usr/local/lib/libwx_macu_core-2.8.a
> 
> Help?

What do you get when you run this:

	/usr/local/bin/wx-config --libs

That is what you should use for linking, if that doesn't work then there 
is a bug.  Also, you should use wx-config --cxxflags when compiling.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wx-users mailing list