Shortly speaking:
alt text http://www.uni-koblenz.de/~aheld/Cmake%20wears%20very%20dark%20sunglasses.png
To add insult to injury, CMake actually ran excellent several times. I struggled with a compiler error when CMake suddenly did not want to work. For reference, here is the entire CMakeLists.txt file:
set(CMAKE_INCLUDE_CURRENT_DIR ON) Find_Package ( SDL REQUIRED ) Find_Package ( SDL_image REQUIRED ) Find_Package ( SDL_mixer REQUIRED ) if ( NOT SDL_FOUND ) message ( FATAL_ERROR "Make sure that SDL is installed" ) endif ( NOT SDL_FOUND ) link_libraries ( ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} SDLmain ) set(wiggle_SOURCES level.cpp levelgenerator.cpp main.cpp player.cpp scoreboard.cpp snake.cpp soundplayer.cpp titlescreen.cpp ) add_executable(Wiggle ../${wiggle_SOURCES})
The error occurred the first time, instead of typing โmakeโ I typed โmake -lSDL -lSDL_image -lSDL_mixerโ - I refused to find the header files SDL.h and SDL_image.h after I disconnected the project from the code :: Blocks.
This line:
add_executable(Wiggle ../${wiggle_SOURCES})
Will expand to:
add_executable(Wiggle ../level.cpp levelgenerator.cpp main.cpp etc)
, , , . , , level.cpp , ?
level.cpp
Source: https://habr.com/ru/post/1736614/More articles:What are the patterns / types of task queues? Can a multi-level task queue exist as an N-tree? - scheduled-tasksProblem with additional queries on Oracle 10g - sqlRecommendations for string processing in VC ++? - c ++WPF Animation Duration - wpfError saving iPhone Coredata - iphonehow to check a document in a document library programmatically in sharepoint - documentOn MacOSX, in a C ++ program, what guarantees can I get in an IO file - c ++WPF: stopping ContextMenu from closing - c #How to allocate more memory for a buffer in C ++? - c ++How to set a model attribute for each action - grailsAll Articles