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

name of TestGame executable clashes with directory name under Linux #1

Open
dlyongemallo opened this issue Jul 5, 2024 · 0 comments

Comments

@dlyongemallo
Copy link

On a Linux system (with PLATFORM_WINDOWS set to OFF), running cmake . followed by make results in the following error:

$ make
[ 11%] Building CXX object CMakeFiles/MiniEngine.dir/src/Platforms/Linux/LinuxWindow.cpp.o
[ 22%] Building CXX object CMakeFiles/MiniEngine.dir/src/Core/Game.cpp.o
[ 33%] Building CXX object CMakeFiles/MiniEngine.dir/src/Core/MiniTime.cpp.o
[ 44%] Building CXX object CMakeFiles/MiniEngine.dir/src/Core/Log/MiniLogger.cpp.o
[ 55%] Building CXX object CMakeFiles/MiniEngine.dir/src/Core/Log/Log.cpp.o
[ 66%] Building CXX object CMakeFiles/MiniEngine.dir/src/Core/Events/EventHandler.cpp.o
[ 77%] Linking CXX static library libMiniEngine.a
[ 77%] Built target MiniEngine
[ 88%] Building CXX object CMakeFiles/TestGame.dir/TestGame/TestGame.cpp.o
[100%] Linking CXX executable TestGame
/usr/bin/ld: cannot open output file TestGame: Is a directory
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/TestGame.dir/build.make:98: TestGame] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/TestGame.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

The reason is that in CMakeLists.txt, the line project(TestGame) implies that the executable should be named TestGame, but a file (actually, a directory) with that name already exists. Renaming either the project or the directory allows the compilation to succeed.

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

1 participant