Closed Freddyv2356 closed 2 years ago
Hello @Freddyv2356 You shouldn't need to make any changes to the source code for it to compile. Take in mind that you need the development versions of the dependencies as these are needed in compilation time (and the compiled versions too so the code can run). What distro are you using?
It's linux ubuntu and of course I think that I installed most of it are -dev version.
Hi @Freddyv2356
Have you installed libfreeimage-dev
? That package should provide the functions that your compiler is complaining about. (you can check if it's installed running dpkg -l | grep freeimage
)
It's also installed too.
/usr/bin/ld: CMakeFiles/wallengine.dir/main.cpp.o: in function `main':
main.cpp:(.text+0x54b): undefined reference to `FreeImage_Initialise'
/usr/bin/ld: main.cpp:(.text+0xcb5): 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+0x4a1): undefined reference to `FreeImage_OpenMemory'
/usr/bin/ld: CTexture.cpp:(.text+0x4c6): undefined reference to `FreeImage_LoadFromMemory'
/usr/bin/ld: CTexture.cpp:(.text+0x4d6): undefined reference to `FreeImage_FlipVertical'
/usr/bin/ld: CTexture.cpp:(.text+0x4e2): undefined reference to `FreeImage_ConvertTo32Bits'
/usr/bin/ld: CTexture.cpp:(.text+0x4f2): undefined reference to `FreeImage_GetBits'
/usr/bin/ld: CTexture.cpp:(.text+0x502): undefined reference to `FreeImage_GetWidth'
/usr/bin/ld: CTexture.cpp:(.text+0x511): undefined reference to `FreeImage_GetHeight'
/usr/bin/ld: CTexture.cpp:(.text+0x638): undefined reference to `FreeImage_Unload'
/usr/bin/ld: CTexture.cpp:(.text+0x644): undefined reference to `FreeImage_Unload'
/usr/bin/ld: CTexture.cpp:(.text+0x650): undefined reference to `FreeImage_CloseMemory'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/wallengine.dir/build.make:1110: wallengine] Error 1
make[1]: *** [CMakeFiles/Makefile2:135: CMakeFiles/wallengine.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Getting the same on arch, aur only has freeimage
@Blakeinstein freeimage is part of the default repos, not part of the AUR. I'm running that exact same version you linked and I'm having no issues.
@Freddyv2356 can you both re-run the cmake step and share the output of it? It should be complaining if FreeImage is not being detected properly (or reporting where it was found if it's installed).
I deleted all files under build and re-cmake. just solved the problem
When i try to run "make" command and with full dependencies installed it's run half way until Linking CXX and there is issues with FreeImage that it's can't reference to these. And I'm new to linux so i don't know what to modify or change it. As the error shown is this:
/usr/bin/ld: CMakeFiles/wallengine.dir/main.cpp.o: in function
main': main.cpp:(.text+0x55c): undefined reference toFreeImage_Initialise' /usr/bin/ld: main.cpp:(.text+0xcb7): undefined reference to
FreeImage_DeInitialise' /usr/bin/ld: CMakeFiles/wallengine.dir/src/WallpaperEngine/Assets/CTexture.cpp.o: in functionWallpaperEngine::Assets::CTexture::CTexture(void*)': CTexture.cpp:(.text+0x4a6): undefined reference to
FreeImage_OpenMemory' /usr/bin/ld: CTexture.cpp:(.text+0x4cb): undefined reference toFreeImage_LoadFromMemory' /usr/bin/ld: CTexture.cpp:(.text+0x4db): undefined reference to
FreeImage_FlipVertical' /usr/bin/ld: CTexture.cpp:(.text+0x4e7): undefined reference toFreeImage_ConvertTo32Bits' /usr/bin/ld: CTexture.cpp:(.text+0x4f7): undefined reference to
FreeImage_GetBits' /usr/bin/ld: CTexture.cpp:(.text+0x507): undefined reference toFreeImage_GetWidth' /usr/bin/ld: CTexture.cpp:(.text+0x516): undefined reference to
FreeImage_GetHeight' /usr/bin/ld: CTexture.cpp:(.text+0x63d): undefined reference toFreeImage_Unload' /usr/bin/ld: CTexture.cpp:(.text+0x649): undefined reference to
FreeImage_Unload' /usr/bin/ld: CTexture.cpp:(.text+0x655): undefined reference toFreeImage_CloseMemory' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/wallengine.dir/build.make:1056: wallengine] Error 1 make[1]: *** [CMakeFiles/Makefile2:156: CMakeFiles/wallengine.dir/all] Error 2 make: *** [Makefile:149: all] Error 2
Or as the image shown hereSo how to fix this even though i think it's have to do something with modifying with the main.cpp.o and main.cpp. Thanks.