Closed Soggy-Pancake closed 2 years ago
Sounds like you might be missing some stuff required for the compiler. Installing it will depend on what distro you're using. If you're using a debian-based distro most likely the package build-essential should fix this issue.
Can reproduce, but on FreeImage:
[100%] Linking CXX executable wallengine
/usr/bin/ld: CMakeFiles/wallengine.dir/main.cpp.o: in function `main':
main.cpp:(.text+0x6d6): undefined reference to `FreeImage_Initialise'
/usr/bin/ld: main.cpp:(.text+0xdf1): undefined reference to `FreeImage_DeInitialise'
/usr/bin/ld: CMakeFiles/wallengine.dir/src/WallpaperEngine/Assets/CTexture.cpp.o: in function `WallpaperEngine::Assets::CTexture::CTexture(void*)':
CTexture.cpp:(.text+0x523): undefined reference to `FreeImage_OpenMemory'
/usr/bin/ld: CTexture.cpp:(.text+0x548): undefined reference to `FreeImage_LoadFromMemory'
/usr/bin/ld: CTexture.cpp:(.text+0x558): undefined reference to `FreeImage_FlipVertical'
/usr/bin/ld: CTexture.cpp:(.text+0x564): undefined reference to `FreeImage_ConvertTo32Bits'
/usr/bin/ld: CTexture.cpp:(.text+0x574): undefined reference to `FreeImage_GetBits'
/usr/bin/ld: CTexture.cpp:(.text+0x584): undefined reference to `FreeImage_GetWidth'
/usr/bin/ld: CTexture.cpp:(.text+0x596): undefined reference to `FreeImage_GetHeight'
/usr/bin/ld: CTexture.cpp:(.text+0x6d5): undefined reference to `FreeImage_Unload'
/usr/bin/ld: CTexture.cpp:(.text+0x6e1): undefined reference to `FreeImage_Unload'
/usr/bin/ld: CTexture.cpp:(.text+0x6ed): undefined reference to `FreeImage_CloseMemory'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/wallengine.dir/build.make:1139: wallengine] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/wallengine.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Distro: Arch Linux
EDIT: Upon closer reading, these issues may be unrelated. EDIT 2: Resolved by deleting build directory and trying again
Just faced the same build issue, also solved by deleting build and trying again. Why does this work xD Thank you for sharing that!
I encountered the same issue and the solution also worked for me. I don't know abt you all, but I think I got the issue due to my failed attempts at compilation while I was figuring out dependencies.
tysm for looking into this!!!!
-- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is unknown -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- broken CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler
is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)
CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred! See also "/home/soggy-pancake/Downloads/wallpaperenginelinux/build/CMakeFiles/CMakeOutput.log". See also "/home/soggy-pancake/Downloads/wallpaperenginelinux/build/CMakeFiles/CMakeError.log".