Author Topic: Build wxwidgets sample project on mac  (Read 5028 times)

Offline uenz

  • Multiple posting newcomer
  • *
  • Posts: 14
Build wxwidgets sample project on mac
« on: July 22, 2010, 07:35:20 pm »
Hi,

i used code:blocks on win32 for a while. Now i tried it on my mac. I`ve downloaded and installed wxwidgets via macports.
I used the wizard to generate a wxwidgets sample an left all on default settings. It is not possible to compile the sample.
Code
Compiling: wxWidgetsTestApp.cpp
Compiling: wxWidgetsTestMain.cpp
Linking executable: bin/Debug/wxWidgetsTest
ld: warning: in /System/Library/Frameworks//QuickTime.framework/QuickTime, missing required architecture x86_64 in file
ld: warning: in /usr/lib/libwx_macud-2.8.dylib, missing required architecture x86_64 in file
Undefined symbols:
  "wxWindowBase::DoSetVirtualSize(int, int)", referenced from:
      vtable for wxWidgetsTestDialogin wxWidgetsTestMain.o
      vtable for wxStaticTextBasein wxWidgetsTestMain.o
      vtable for wxStaticLineBasein wxWidgetsTestMain.o
      vtable for wxButtonBasein wxWidgetsTestMain.o
and so on...
I ve seen that the project uses wx-config, which gives me the following output on commandline:
Code
wx-config --cflags
-I/opt/local/lib/wx/include/mac-unicode-release-2.8 -I/opt/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__

wx-config --libs
-L/opt/local/lib   -L/opt/local/lib -arch i386 -L/opt/local/lib -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime -framework OpenGL -framework AGL  -lwx_macu-2.8

Can someone give me a hint what im doing wrong?

Thx
uenz

Offline uenz

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Build wxwidgets sample project on mac
« Reply #1 on: July 22, 2010, 11:14:22 pm »
Found the solution:
Apples gcc makes 64bit code on a 64bit machine per default. When adding 
Code
<Add option="-arch i386" />
to Compiler and Linker options it works.