i download the source code from branch-olg-es,then i use xcode8 build lrrlicht to generate a static library for my Mac(OSX 10.11), I open it's example and run helloWorld ,there happend crash. i do not know what is the matter about it, since i build for my iPhone ,run helloWorld-ios correctly.
issues:
Undefined symbols for architecture x86_64:
"irr::CIrrDeviceMacOSX::CIrrDeviceMacOSX(irr::SIrrlichtCreationParameters const&)", referenced from:
_createDeviceEx in libIrrlicht.a(Irrlicht.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
please give me an help, I do not how to deal with this matter,thanks,please?
liblrrlicht.a run on Mac happend crash
Re: liblrrlicht.a run on Mac happend crash
Did you build the static library with "_IRR_OSX_PLATFORM_" defined?
Re: liblrrlicht.a run on Mac happend crash
thanks , I do not know what it is about "_IRR_OSX_PLATFORM_", Can you give me some detail step to build for my Mac.? please
Re: liblrrlicht.a run on Mac happend crash
now, I find the "_IRR_OSX_PLATFORM_", so i think it can not relate to this matter, in olg-es, i choose the project name "lrrlicht_OSX", then i build it, generate a static library for My Mac,but when i run helloworld, it crash this problem, i do not how to deal with it.
Re: liblrrlicht.a run on Mac happend crash
I never tried to build the OSX version of Irrlicht, so I can't be really specific, but the linker error you pasted seems to indicate the linker couldn't find the reference to CIrrDeviceMacOSX in the function call createDeviceEx. And regardless of the library, linker errors are always handled the same way.
The linker error you're receiving seems to indicate that either you didn't include the library correctly in your test project, or that the library doesn't compile correctly.
First, see if you included the library correctly. You said you recompiled the Irrlicht library yourself and then made a HelloWorld project, right? Did you check that the HelloWorld project has the correct Search Path for the version of the library you compiled? Check your Search Path for the HelloWorld project in XCode and see if it points to the correct libary, or check if another path with another version of the libary has precedence over your path.
Once you validated that you're including the correct library, check if the library build correctly. When I looked through the code, I saw that the CIrrDeviceMacOSX function is only compiled when you define the _IRR_OSX_PLATFORM_ macro. Can you confirm that the library builds correctly? Go in the CIrrDeviceMacOSX function, and add the following line inside the function :
Then recompile the Irrlicht library and see if this error happens when you compile. It should be. If not, it means you didn't compile the library for MacOSX.
The linker error you're receiving seems to indicate that either you didn't include the library correctly in your test project, or that the library doesn't compile correctly.
First, see if you included the library correctly. You said you recompiled the Irrlicht library yourself and then made a HelloWorld project, right? Did you check that the HelloWorld project has the correct Search Path for the version of the library you compiled? Check your Search Path for the HelloWorld project in XCode and see if it points to the correct libary, or check if another path with another version of the libary has precedence over your path.
Once you validated that you're including the correct library, check if the library build correctly. When I looked through the code, I saw that the CIrrDeviceMacOSX function is only compiled when you define the _IRR_OSX_PLATFORM_ macro. Can you confirm that the library builds correctly? Go in the CIrrDeviceMacOSX function, and add the following line inside the function :
Code: Select all
#error Stop.