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

Manjaro can't compile this #14

Open
xcom169 opened this issue Feb 1, 2020 · 5 comments
Open

Manjaro can't compile this #14

xcom169 opened this issue Feb 1, 2020 · 5 comments

Comments

@xcom169
Copy link

xcom169 commented Feb 1, 2020

Manjaro can't compile this because of missing SDL?

ain.cpp:(.text+0x58c): undefined reference to SDL_GetTicks' /usr/bin/ld: Main.cpp:(.text+0x5b8): undefined reference to SDL_PollEvent'
/usr/bin/ld: Main.cpp:(.text+0x604): undefined reference to SDL_GetKeyboardState' /usr/bin/ld: Main.cpp:(.text+0x7d6): undefined reference to SDL_SetWindowFullscreen'
/usr/bin/ld: Main.cpp:(.text+0x81b): undefined reference to SDL_UpdateTexture' /usr/bin/ld: Main.cpp:(.text+0x82a): undefined reference to SDL_RenderClear'
/usr/bin/ld: Main.cpp:(.text+0x843): undefined reference to SDL_RenderSetLogicalSize' /usr/bin/ld: Main.cpp:(.text+0x863): undefined reference to SDL_RenderCopy'
/usr/bin/ld: Main.cpp:(.text+0x885): undefined reference to SDL_RenderSetLogicalSize' /usr/bin/ld: Main.cpp:(.text+0x8a5): undefined reference to SDL_RenderCopy'
/usr/bin/ld: Main.cpp:(.text+0x8b4): undefined reference to SDL_RenderPresent' /usr/bin/ld: Main.cpp:(.text+0x8b9): undefined reference to SDL_GetTicks'
/usr/bin/ld: Main.cpp:(.text+0x922): undefined reference to SDL_Delay' /usr/bin/ld: CMakeFiles/smbc.dir/source/Emulation/APU.cpp.o: in function APU::stepFrame()':
APU.cpp:(.text+0x3f4): undefined reference to SDL_LockAudio' /usr/bin/ld: APU.cpp:(.text+0x4f1): undefined reference to SDL_UnlockAudio'
/usr/bin/ld: CMakeFiles/smbc.dir/source/Util/Video.cpp.o: in function generateScanlineTexture(SDL_Renderer*)': Video.cpp:(.text+0x3f2): undefined reference to SDL_CreateTexture'
/usr/bin/ld: Video.cpp:(.text+0x4fe): undefined reference to SDL_SetTextureBlendMode' /usr/bin/ld: Video.cpp:(.text+0x518): undefined reference to SDL_UpdateTexture'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/smbc.dir/build.make:219: smbc] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/smbc.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

@xcom169
Copy link
Author

xcom169 commented Feb 9, 2020

I think FIND SDL PACKAGE is not working in CMAKE

@F0bes
Copy link

F0bes commented Mar 1, 2020

I know I'm a month late but changing the cmake file to contain this line:
target_link_libraries(smbc SDL2)
Worked for me on Manjaro Linux

@tan-wei
Copy link

tan-wei commented Apr 15, 2020

Both ${SDL2_LIBRARY} and ${SDL2_LIBRARIES} are empty, seems bug of the new version CMake (for me is 3.17.1 now).

@Uriegas
Copy link

Uriegas commented Apr 1, 2021

I'm in Manjaro too, I get this error while executing cmake .. in build directory:

CMake Error at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.19/Modules/FindBoost.cmake:2208 (find_package_handle_standard_args)
  CMakeLists.txt:22 (find_package)


-- Configuring incomplete, errors occurred!

@coreybruce
Copy link

Can confirm this is also a issue for me on the Raspberry pi 4

By editing CMakeLists.txt and replacing target_link_libraries(smbc ${SDL2_LIBRARY} ${SDL2_LIBRARIES}) with target_link_libraries(smbc SDL2) it will compile, can the CMakeLists.txt file be updated place?

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

5 participants