I’ve downloaded and installed Cinder and even run the TinderBox tutorial to create a Cinder project in XCode.
However i’m keen to use eclipse as my IDE and not Xcode.
I’m running OSX 10.8.2
Having followed the following tutorials to configure eclipse Configure Eclipse and Vimeo Video, I encountered a number of issues compiling and linking.
make *** Error 1 C/C++ Problem cinder
undefined symbols for architecture i386:
I figure i’ve either not followed the tutorial posts to the letter or there is some difference in my setup.
Note: this is a Question Answer post.
index
** Configure eclipse **
Assumes that you have a C++ version of eclipse and have created a basic C++ Cinder project. You can find the .h and .cpp files in the appendix below. The following outlines the settings you need to configure to compile.
Step 1.
Add the following Variable.
Step 2.
Here, in the ‘command’ input field you need to add after the g++ your command line options and OSX framework references
-m32 Tells the link to use 32 bit rather than 64 bit.
-arch i386 Ensures we link for the correct architecture.
-framework Reference the frameworks required to run Cinder (As i understand it currently)
Step 3.
Add the following library search paths. ( -L command line)
${CINDER_PATH}/lib
${CINDER_PATH}/lib/ios-sim
${CINDER_PATH}/lib/ios
${CINDER_PATH}/lib/macosx
Add the following libraries to include ( -l command line)
Step 4.
Under the ‘MacOS X C++ Linker’ menu select the ‘Miscellaneous’ option and add the following in the XLinker field.
Step 5.
Add the following in the ‘command” field.
g++ -m32 -arch i386
Select the ‘Includes’ menu option and add the following folder paths
** Issues encountered and solutions **
Problem A
Solution A
I found that there were two contributing factors to overcoming this issue. The first was adding the -m32 and -arch i386 command line options to the linker and compiler settings.
The second was that inclusion of the following -XLinker option
Note: The above is for debug mode, (The _d) for release you have to set it to
** Appendix **
HelloWorld.h
HellowWorld.cpp
References
All credit goes to these posts that helped me in the first place and of course the creators of Cinder.