0
votes

When to generate an executable with xcode, I have 3 Linking errors. I used Irrlicht 1.9 that I compile myself this morning.

I would like to say that the file CIrrDeviceOSX.mm is an objective-c file that can be found here : https://github.com/zaki/irrlicht/blob/master/source/Irrlicht/CIrrDeviceOSX.h https://github.com/zaki/irrlicht/blob/master/source/Irrlicht/CIrrDeviceOSX.mm

I think that the error is inside "std::map KeyCodes;" in CIrrDeviceOSX.h and used in CIrrDeviceOSX.mm

I dont know if the problem is that the file is in objective-c and the signature of the methods is different or that there are difference in version of the C++ (c++11 or ???).

Ld bin/Debug/minetest normal x86_64 cd /Users/bluholm/Desktop/minetest-release/minetest export MACOSX_DEPLOYMENT_TARGET=10.12 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -L/Users/bluholm/Desktop/minetest-release/minetest/bin/Debug -F/Users/bluholm/Desktop/minetest-release/minetest/bin/Debug -filelist /Users/bluholm/Desktop/minetest-release/minetest-osx/src/minetest.build/Debug/minetest.build/Objects-normal/x86_64/minetest.LinkFileList -mmacosx-version-min=10.12 -Xlinker -object_path_lto -Xlinker /Users/bluholm/Desktop/minetest-release/minetest-osx/src/minetest.build/Debug/minetest.build/Objects-normal/x86_64/minetest_lto.o -Xlinker -no_deduplicate -lc++ -pagezero_size 10000 -image_base 100000000 -Wl,-search_paths_first -Wl,-headerpad_max_install_names /usr/lib/libz.dylib /usr/local/Cellar/irrlicht/1.9/lib/libIrrlicht.a -framework OpenGL -framework OpenAL /usr/local/lib/libvorbisfile.dylib /usr/local/lib/libvorbis.dylib /usr/local/lib/libogg.dylib /usr/lib/libsqlite3.dylib /usr/local/lib/libluajit-5.1.dylib /Users/bluholm/Desktop/minetest-release/minetest-osx/src/gmp/Debug/libgmp.a /Users/bluholm/Desktop/minetest-release/minetest-osx/src/jsoncpp/json/Debug/libjsoncpp.a -framework CoreFoundation -lpthread /usr/lib/libiconv.dylib -framework Carbon -framework Cocoa -framework IOKit /usr/lib/libiconv.dylib /usr/lib/libcurl.dylib /usr/local/lib/libfreetype.dylib /Users/bluholm/Desktop/minetest-release/minetest-osx/src/cguittfont/Debug/libcguittfont.a /usr/lib/libcurses.dylib /usr/lib/libform.dylib /usr/local/lib/libhiredis.dylib -framework Carbon -framework Cocoa -framework IOKit /usr/lib/libcurl.dylib /usr/lib/libcurses.dylib /usr/lib/libform.dylib /usr/local/lib/libhiredis.dylib /usr/lib/libz.dylib /usr/local/Cellar/irrlicht/1.9/lib/libIrrlicht.a /usr/local/lib/libfreetype.dylib -Xlinker -dependency_info -Xlinker /Users/bluholm/Desktop/minetest-release/minetest-osx/src/minetest.build/Debug/minetest.build/Objects-normal/x86_64/minetest_dependency_info.dat -o /Users/bluholm/Desktop/minetest-release/minetest/bin/Debug/minetest

Undefined symbols for architecture x86_64:

"std::_Rb_tree_decrement(std::_Rb_tree_node_base*)", referenced from: std::_Rb_tree_iterator >::operator--() in libIrrlicht.a(CIrrDeviceOSX.o)

"std::_Rb_tree_increment(std::_Rb_tree_node_base*)", referenced from: std::_Rb_tree_iterator >::operator++() in libIrrlicht.a(CIrrDeviceOSX.o)

"std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)", referenced from: std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair const&) in libIrrlicht.a(CIrrDeviceOSX.o)

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

1

1 Answers

0
votes

Try to created a new project in XCode with the sources and changed the C++ Standard Library from the default libc++ to libstdc++