User forums > Using Code::Blocks

Code::Blocks, wxWidgets and Mac OS X

(1/4) > >>

BastiaanOlij:
Hi All,

Been doing alot of googling and searching and every time I get a step closer but I'm stuck at the final end probably overlooking something utterly dumb.

Yes I'm new to code::blocks, forgive me:)

Anyway I've downloaded wxWidgets 3.0.0 and compiled from source. I'm going down the route of creating a static library for wxWidgets and compiling against that and ignoring xcode for as much as I can. In a nutshell, created a build folder, using configure to set up my build, then make, and finally make install. Also compiled the samples and they all work so I'm pretty sure wxWidgets is up and running.

Booted up code::blocks, used the wizard to create an empty wxWidgets project, pretty much default settings for 3.0.0. Tried to compile and hit the first road block. Couldn't find several wxWidgets include files...
Even though I used make install I think I'm missing something there, the files got nicely installed into /usr/local but alas. I left that alone and instead concentrated on my source tree.

Opened up build options and setup search directories manually.
Compiler search directories are set up as:
../wxWidgets/include
../wxWidgets/build-cocoa/lib/wx/include/osx_cocoa-unicode-static-3.0
Linker search directories are set up as:
../wxWidgets/build-cocoa/lib

Tried compiling again, got a little further, now it started to complaining about missing targets and such with the message wx-setup should be run
Again, opening up build options, noticed the inclusion of wx-setup in the compilers "other options" and "other linker options" under the linker settings

All I did here is complete the path, again I think this is the same issue as above that wxWidgets didn't get installed in the right location for code::blocks to find it.

Compiling now compiles all the sources correctly and attempts to link everything correctly however I'm left with two linker issues:

ld: warning: option -s is obsolete and being ignored
ld: internal error: atom not found in symbolIndex(__ZN8wxString7ImplStrEPKcRK8wxMBConv) for architecture x86_64

I have no clue here :)

Cheers,

Bastiaan Olij









BlueHazzard:
i'm np mac user, so probably i can't help, but it is always a good idea to report a compiling/linking problem with the help of this template: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

you posted the wrong build log... and please make a rebuild

greetings

BastiaanOlij:
BlueHazzard,

Hopefully someone has an answer though:)

I did just notice that calling wx-setup in other options is only working for the linker, for the compiler it's not inserting the flags. I ended up manually inserting them but to no avail, still same issue in the build log:


--- Code: ----------------- Build: Release in TestWidgets (compiler: GNU GCC Compiler)---------------

g++ -Wall -O2 -I/Projects/CPP/wxWidgets-3.0.0/build-cocoa-release/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/Projects/CPP/wxWidgets-3.0.0/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I../wxWidgets/include -I../wxWidgets/build-cocoa-release/lib/wx/include/osx_cocoa-unicode-static-3.0 -c /Projects/Personal/CPP/Testing/TestWidgets/TestWidgetsApp.cpp -o obj/Release/TestWidgetsApp.o
g++ -Wall -O2 -I/Projects/CPP/wxWidgets-3.0.0/build-cocoa-release/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/Projects/CPP/wxWidgets-3.0.0/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -I../wxWidgets/include -I../wxWidgets/build-cocoa-release/lib/wx/include/osx_cocoa-unicode-static-3.0 -c /Projects/Personal/CPP/Testing/TestWidgets/TestWidgetsMain.cpp -o obj/Release/TestWidgetsMain.o
g++ -L../wxWidgets/build-cocoa-release/lib -o bin/Release/TestWidgets obj/Release/TestWidgetsApp.o obj/Release/TestWidgetsMain.o  -s -L/Projects/CPP/wxWidgets-3.0.0/build-cocoa-release/lib   -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL /Projects/CPP/wxWidgets-3.0.0/build-cocoa-release/lib/libwx_osx_cocoau-3.0.a -framework WebKit -lwxregexu-3.0 -lwxtiff-3.0 -lwxjpeg-3.0 -lwxpng-3.0 -lz -lpthread -liconv   
ld: warning: option -s is obsolete and being ignored
ld: internal error: atom not found in symbolIndex(__ZN8wxString7ImplStrEPKcRK8wxMBConv) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Process terminated with status 1 (0 minute(s), 3 second(s))
0 error(s), 1 warning(s) (0 minute(s), 3 second(s))

--- End code ---

oBFusCATed:
Are you sure your wxwigets is build for 64bits?
Probably you'll get better support in the wxWidgets' forum/mailing list.

BastiaanOlij:
oBFusCATed, I'll certainly ask there as well.

Any ideas why the output from wx_config is only working for the linker and not the compiler and why I had to manually copy all the flags in?

The "other options" is set to:
`../wxWidgets/build-cocoa/wx-config --cflags`

It does seem to do something as the string isn't put into the command string and like I mentioned, executing this on the command line and pasting the flags into the "other options" field works fine.
wx-config is executed properly for the linker options..  

Navigation

[0] Message Index

[#] Next page

Go to full version