Hey folks,
can anybody tell me how to link a static library under MacOSX and XCode 4 correctly without having the static library project added as a target? I want to compile Irrlicht projects with simply the a-file, the necessary include directory and the program code.
I set up a vanilla Cocoa-project in XCode, added the include files and added the correct library search path in the build settings, but it still fails at building due to linking errors.
I added the libIrrlicht.a file under "Linked Frameworks and Libraries" and "Link Binary With Libraries".
In the Build Settings I set the "Header Search Paths" and the "Library Search Path" correctly.
Since I down have the project of the static library in my current project I cannot use it as target dependency.
Does anyone have a clue what I can try to compile a application with simply the a-file and the irrlicht include directory?
EDIT: The program only contains a main function with a createDevice-statement. Here is a picture of the occuring errors
[MacOSX] How to build a new project with compiled library?
-
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact:
Re: [MacOSX] How to build a new project with compiled librar
This issue is probably related to different "-stdlib" settings in project settings. Are you sure that you also set the same architectures target (and build only for active architecture flag) for both library and application?
For example in Android NDK when you set std=gnu++11 and statically link library to application _Rb_tree_decrement etc. are also missing, so try to switch to other std flag, it should help.
For example in Android NDK when you set std=gnu++11 and statically link library to application _Rb_tree_decrement etc. are also missing, so try to switch to other std flag, it should help.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
-
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact:
Re: [MacOSX] How to build a new project with compiled librar
Well thank you so much. That was exactly the problem. I wouldn't have figured this out on myself