Location
Location copied to clipboard
build fails on macos
... because the file system is not case sensitive and the subdirectory location exists in the build directory. If you follow the description from the README.md to include Location in your own project everything should be fine.
Details:
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/Location.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/Location.dir/main.cpp.o -o Location math/libLocation_math.a models/libLocation_models.a location/libLocation_location.a sensor/libLocation_sensor.a system/libLocation_system.a utils/libLocation_utils.a test/libLocation_test.a location/libLocation_location.a models/libLocation_models.a sensor/libLocation_sensor.a math/libLocation_math.a system/libLocation_system.a utils/libLocation_utils.a
ld: can't open output file for writing: Location, errno=21 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to fix:
Use a different name (other than Location) in Location/CMakeLists.txt, e.g.
...
add_executable(LocationTest main.cpp)
target_link_libraries(LocationTest Location_math)
target_link_libraries(LocationTest Location_models)
target_link_libraries(LocationTest Location_location)
target_link_libraries(LocationTest Location_sensor)
target_link_libraries(LocationTest Location_system)
target_link_libraries(LocationTest Location_utils)
target_link_libraries(LocationTest Location_test)
Thanks for your advice, I will update some descrition.