Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails on macos #3

Open
tkleiner opened this issue Jan 9, 2020 · 1 comment
Open

build fails on macos #3

tkleiner opened this issue Jan 9, 2020 · 1 comment

Comments

@tkleiner
Copy link

tkleiner commented Jan 9, 2020

... 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)
@yyccR
Copy link
Owner

yyccR commented Jan 10, 2020

Thanks for your advice, I will update some descrition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants