I'm using ubuntu(32 bit) on virtualbox. I am trying to add a the rtlsdr library but Qt creator can't find the rtlsdr library.
The library is located in /usr/local/lib/librtlsdr.so and I have tried adding the following to my .pro file
LIBS += -L/usr/local/lib -lrtlsdr
INCLUDEPATH +=usr/local/lib
But I get the following error:
/home/luis/qt-bbb/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link=/home/luis/qt-bbb/tslib/lib -Wl,-rpath,/opt/qt-arm/lib -o qt-test main.o mainwindow.o moc_mainwindow.o -L/home/luis/qt-bbb/tslib/lib -L/opt/qt-arm/lib -L/home/luis/qt-arm/rtl-sdr/build/src/ -lrtlsdr -lQtGui -L/opt/qt-arm/lib -L/home/luis/qt-bbb/tslib/lib -lQtNetwork -lQtCore -lpthread
/home/luis/qt-bbb/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: *skipping incompatible /home/luis/qt-arm/rtl-sdr/build/src//librtlsdr.so when searching for -lrtlsdr*
/home/luis/qt-bbb/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: *skipping incompatible /home/luis/qt-arm/rtl-sdr/build/src//librtlsdr.a when searching for -lrtlsdr*
Makefile:105: recipe for target 'qt-test' failed
/home/luis/qt-bbb/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lrtlsdr
collect2: error: ld returned 1 exit status
make: *** [qt-test] Error 1
I'm using ubuntu 32bit to cross compile for my beaglebone running debian. Deploying on my beaglebone works ok and I verified the libraries are 32 bit so I don't know why it can't find them or why it's giving me “skipping incompatible” message. I also tried adding them by right clicking on the .pro->add library but still can't find them.
skipping incompatible tells you the library cannot be linked. Probably compiled with the wrong compiler?
– Sebastian Lange
Ok i figured out my problem, the library was built for x86 and not arm. Thanks for the hints! – luismbedder
Related
There seems to be a bunch of similar questions to this one but they all seem to have answered that aren't related to what I'm doing.
I've been working on a C++ project using Ogre3D for over a year and I'm currently trying to add support for playing videos. I found a suitable library that uses ogre and ffmpeg to play the videos which I'm now trying to incorporate into our build system. Project uses mingw and cmake.
I've managed to compile the video library (https://github.com/scrawl/ogre-ffmpeg-videoplayer) and I managed to link it just fine with the my project.
The problem arises during linking of the main project, it complains about undefined references to basic ogre functions that we're working fine before. It points to lines of code in the new video library where the failing reference occurs.
The video library relies on ogre and ffmpeg, initially i got undefined references to ffmpeg functions but after managing to link the ffmpeg libraries with my main project those errors went away, so I don't understand the current undefined ogre references.
One thing that might be of note is that when the video library is compiling, the g++ commands does not reference ogre or ffmpeg even though the cmake files are calling target_link_libraries on them. This is a bit strange to me, but again probably just a lack of linking understanding on my part since it compiles fine.
Here's the full build log with the main linking error: http://pastebin.com/X6Lbccag
the offending lines from there:
C:\mingw\bin\g++.exe -std=c++0x -msse2 -Wno-unused-function -g -Wl,--whole-archive CMakeFiles\RunTests.dir/objects.a -Wl,--no-whole-archive -o RunTests.exe -Wl,--out-implib,libRunTests.dll.a -Wl,--major-image-version,0,--minor-image-version,0 libThrive.a contrib\googletest\libgtest_main.a C:\mingw\install\lib\libboost_thread-mt.dll C:\mingw\install\lib\libboost_date_time-mt.dll C:\mingw\install\lib\libboost_system-mt.dll C:\mingw\install\lib\libboost_chrono-mt.dll C:\mingw\install\lib\libboost_filesystem-mt.dll C:\mingw\OgreSDK\lib\Debug\libOgreMain_d.dll.a C:\mingw\install\lib\libboost_thread-mt.dll C:\mingw\install\lib\libboost_date_time-mt.dll C:\mingw\install\lib\libboost_system-mt.dll C:\mingw\install\lib\libboost_chrono-mt.dll C:\mingw\install\lib\libboost_filesystem-mt.dll C:\mingw\OgreSDK\lib\Debug\libOgreMain_d.dll.a C:\mingw\OgreSDK\lib\Debug\libOIS_d.dll.a C:\mingw\install\lib\libBulletDynamics_Debug.a C:\mingw\install\lib\libBulletCollision_Debug.a C:\mingw\install\lib\libLinearMath_Debug.a C:\mingw\install\lib\libBulletSoftBody_Debug.a C:\mingw\install\lib\libCEGUIBase-9999_d.dll.a C:\mingw\install\lib\libCEGUIOgreRenderer-9999_d.dll.a C:\mingw\install\lib\libtinyxml.a C:\mingw\install\lib\Debug\libogre-ffmpeg-videoplayer.a C:\mingw\install\lib\libavcodec.dll.a C:\mingw\install\lib\libavformat.dll.a C:\mingw\install\lib\libavutil.dll.a C:\mingw\install\lib\libswscale.dll.a C:\mingw\install\lib\libswresample.dll.a contrib\luabind\src\libluabind.a contrib\lua\liblua.dll.a -lm C:\mingw\install\bin\libcAudio.dll contrib\googletest\libgtest.a -lpthread -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
C:\mingw\install\lib\Debug\libogre-ffmpeg-videoplayer.a(videostate.cpp.obj): In function `ZN5Video10VideoState4initERKSs':
C:/mingw/temp/ffmpeg/ogre-ffmpeg-videoplayer-master/src/videostate.cpp:617: undefined reference to `Ogre::ResourceGroupManager::openResource(std::string const&, std::string const&, bool, Ogre::Resource*)'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[2]: *** [RunTests.exe] Error 1
mingw32-make.exe[1]: *** [CMakeFiles/RunTests.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
You'll notice that libOgreMain_d.dll.a is linked in the failing command which is what contains the referenced Ogre::ResourceGroupManager::openResource function (i confirmed this by finding the function in the semi-scrambled libOgreMain_d.dll.a). The cmakelists.txt: http://pastebin.com/LVsJtxny
Here's the compilation log from the video library: http://pastebin.com/k3jLiL09
and it's cmakelists.txt: https://github.com/scrawl/ogre-ffmpeg-videoplayer/blob/master/CMakeLists.txt
My first thought that perhaps the problem was in the video library compilation not linking to ogre since the g++ commands don't mention ogre, but the cmakelists.txt seems to be fine (I confirms that it finds ogre and that ogre is included in the target_link_libraries)
My second thought we're that perhaps they link to different versions of ogre but that can't be as they both find the same ogre installation and same ogre libraries.
Is anyone able to spot what I might be doing wrong and what I could try to fix the issue?
Thanks!
I managed to solve it.
Reordering the list of libraries to link in the target_link_libraries command such that the new video library was included before ogre seems to have solved my problem.
I'll accept my own answer in 6 hours
The following is my current environment
Boost version - 1.55
Cmake - 2.8
Ubuntu - 12.04
g++ - 4.8
MPI - 1.8.1
BLAS/LAPACK - Intel MKL
When I compile my Boost MPI code in the above settings, I am getting the following error.
`.text._ZN5boost16exception_detail19error_info_injectorINS_3mpi9exceptionEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_3mpi9exceptionEED1Ev[_ZN5boost16exception_detail19error_info_injectorINS_3mpi9exceptionEED1Ev]' of /usr/lib/x86_64-linux-gnu/libboost_mpi.a(broadcast.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_3mpi9exceptionEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_3mpi9exceptionEED5Ev]' of /usr/lib/x86_64-linux-gnu/libboost_mpi.a(broadcast.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED1Ev[_ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED1Ev]' of /usr/lib/x86_64-linux-gnu/libboost_program_options.a(cmdline.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEED5Ev]' of /usr/lib/x86_64-linux-gnu/libboost_program_options.a(cmdline.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEED1Ev[_ZN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEED1Ev]' of /usr/lib/x86_64-linux-gnu/libboost_program_options.a(value_semantic.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEED5Ev]' of /usr/lib/x86_64-linux-gnu/libboost_program_options.a(value_semantic.o)
`.text._ZN5boost16exception_detail19error_info_injectorISt11logic_errorED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorISt11logic_errorED1Ev[_ZN5boost16exception_detail19error_info_injectorISt11logic_errorED1Ev]' of /usr/lib/x86_64-linux-gnu/libboost_program_options.a(convert.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorISt11logic_errorED2Ev[_ZN5boost16exception_detail19error_info_injectorISt11logic_errorED5Ev]' of /usr/lib/x86_64-linux-gnu/libboost_program_options.a(convert.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_9iostreams10gzip_errorEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_9iostreams10gzip_errorEED1Ev[_ZN5boost16exception_detail19error_info_injectorINS_9iostreams10gzip_errorEED1Ev]' of /usr/lib/x86_64-linux-gnu/libboost_iostreams.a(gzip.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_9iostreams10gzip_errorEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_9iostreams10gzip_errorEED5Ev]' of /usr/lib/x86_64-linux-gnu/libboost_iostreams.a(gzip.o)
collect2: error: ld returned 1 exit status
make[2]: *** [factor] Error 1
make[1]: *** [CMakeFiles/factor.dir/all] Error 2
make: *** [all] Error 2
Browsing the internet I figured the following solutions and none of them works.
Having the latest of all the software compiler, libraries, cmake etc. I have the latest. But I still have the problem.
Include -fexceptions and -fno-use-linker-plugin. I am still getting the error with my current linker command as follows.
/usr/bin/mpicxx -fexceptions -fno-use-linker-plugin CMakeFiles/factor.dir/factor.cpp.o CMakeFiles/factor.dir/factor_jobs.cpp.o -o factor -rdynamic -L/home/ramki/libraries/armadillo-4.300.0/usr/lib -L/home/ramki/intel/mkl/lib/intel64 /usr/lib/x86_64-linux-gnu/libboost_mpi.a /usr/lib/x86_64-linux-gnu/libboost_program_options.a /usr/lib/x86_64-linux-gnu/libboost_iostreams.a -lboost_serialization -lboost_iostreams -lboost_program_options -lboost_mpi -llapack -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -lz -larmadillo factorization/libfactorization.a -Wl,-rpath,/home/ramki/libraries/armadillo-4.300.0/usr/lib:/home/ramki/intel/mkl/lib/intel64
Change the order of the linking libraries - Even this didn't help.
Let me know what is the mistake and how to resolve this error.
When I uninstalled Boost1.43 to move to Boost1.55, some files of Boost1.43 were left in /usr/lib directory as well. The new libraries of Boost1.55 are installed in /usr/lib/x86_64-linux-gnu. While linking if /usr/lib is in the path before /usr/lib/x86_64-linux-gnu, then there is a change of boost1.43 libraries getting mixed up with Boost1.55. I deleted the older Boost1.43 files from /usr/lib and these problems got resolved. Remember to include /usr/lib/x86_64-linux-gnu in the lib path during compilation.
I'm trying to build a specific program on Ubuntu 12.04 64 bit.
The program needs to be compiled 32 bits.
I installed the ia32-libs and gcc-multilib packages.
I managed to compile it on 3 different computers, but on this one, it fails with a weird error.
for some reason, libm.so is not picked up correctly, or something is wrong with the library.
This is the actual compilation line that fails as it was extracted from the Makefile.
gcc -o x86_32_obj/foo x86_32_obj/foomain.o -m32 -fPIC -fno-stack-protector -lc -lgcc -lm -lpthread -lrt -lstdc++ ../libfoo/lib/./libfii.x86_32.a
This is the output
/usr/bin/ld: ../libfoo/lib/./libfoo.x86_32.a(NK_Meas.o): undefined reference to symbol 'expf##GLIBC_2.0'
/usr/bin/ld: note: 'expf##GLIBC_2.0' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib32/libm.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib32/libm.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [foo] Error 2
make: *** [foo] Error 2
I have seen errors such as this in relation to the linking order. It may be possible to address the error by placing the libm linking directive at the very end of your linking configuration.
These interdependencies are very much system dependent, which is probably why the same command works on other systems.
Found the problem.
Apparently, the library file I was linking against was compiled using a different version of GCC.
I don't know how exactly it's related, but once I replaced the gcc compiler to the one used with the library it worked.
I'm building an application for data visualization and the framework I'm using is beautiful OpenFrameworks. On Linux, it compiles and works perfectly, but now it's time to port it to Windows and I'm facing some very strange problems. I can't find relevant information from google. When linking, I get this:
mingw32-g++.exe -o bin\visualisation.exe ...blah.o, blah2.o... ...lib1 lib2 lib3...
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 3 seconds)
0 errors, 0 warnings
(list of object files an libraries is quite long, so I stripped it a bit)
I tried manually building all libraries from scratch and then trying again, but I always get this. No errors, it just doesn't create any executables. It is usually problem with not included library, but then linker gives an error. I also tried to build all from command line, and I get the same result.
So, my question is pretty obvious, where can be the problem?
Just to mention, I'm using Code::Blocks 8.02, Windows XP Home SP3 and MinGW with following components:
gcc-core-3.4.5-20060117-1-vista.tar.gz
gcc-g++-3.4.5-20060117-1-vista.tar.gz
mingw-runtime-3.14.tar.gz
mingw32-make-3.81-2.tar.gz
mingw-utils-0.3.tar.gz
w32api-3.11.tar.gz
binutils-2.18.50-20080109.tar.gz
gdb-6.7.50.20071127-mingw.tar.bz2
Edit:
Log when compiling from command line (cmd.exe):
C:\openFrameworks\apps\examples\GraphVisualOFv2>mingw32-g++.exe -o bin\visualisation.exe obj\release\src\dataAccess\DBDataLoader.o obj\release\src\dataAccess\DataLoader.o obj\release\src\dataAccess\XMLDataLoader.o obj\release\src\dataAccess\c\sacapidll.o obj\release\src\engine\Engine.o obj\release\src\engine\config\Configuration.o obj\release\src\engine\config\ConfigurationControler.o obj\release\src\graph\Edge.o obj\release\src\graph\Graph.o obj\release\src\graph\Vertex.o obj\release\src\main.o obj\release\src\math\AlgorithmicPositioning.o obj\release\src\math\Positioning.o obj\release\src\math\RandomPositioning.o obj\release\src\metaLayer\MetaEdge.o obj\release\src\metaLayer\MetaGraph.o obj\release\src\metaLayer\MetaVertex.o obj\release\src\testApp.o ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib ../../../libs/FreeImage/lib/win_cb/FreeImage.lib ../../../libs/rtAudio/lib/win_cb/librtaudio.a ../../../libs/rtAudio/lib/win_cb/RtAudio.a ../../../libs/rtAudio/lib/win_cb/RtAudioD.a ../../../libs/quicktime/lib/win_cb/qtmlClient.lib ../../../libs/freetype/lib/win_cb/libfreetype.a ../../../libs/glut/lib/win_cb/libglut.a ../../../libs/videoInput/lib/win_cb/videoInputLib.a ../../../libs/fmodex/lib/win_cb/libfmodex.a ../../../libs/glee/lib/win_cb/GLee.lib ../../../libs/glew/lib/win_cb/glew32s.lib ../../../libs/glu/lib/win_cb/glu32.lib ../../../libs/poco/lib/win_cb/libPocoNetmt.a ../../../libs/poco/lib/win_cb/libPocoUtilmt.a ../../../libs/poco/lib/win_cb/libPocoXMLmt.a ../../../libs/poco/lib/win_cb/libPocoFoundationmt.a ../../../libs/asa/lib/win_cb/dbcapi.lib ../../../libs/asa/lib/win_cb/dbextenv11.lib ../../../libs/asa/lib/win_cb/dblibtm.lib ../../../libs/asa/lib/win_cb/dbmlsynccli11.lib ../../../libs/asa/lib/win_cb/dbtlstm.lib ../../../libs/asa/lib/win_cb/odbc32.lib ../../../libs/asa/lib/win_cb/qany11.lib ../../../libs/dlfcn/lib/libdl.a ../../../libs/rudeconfig/lib/librudeconfig.a ../../../libs/freeglut/lib/libfreeglut.a -lopengl32 -lglu32 -ldsound -lwinmm -ldxguid -lstrmbase -lstrmiids -lz -luuid -lole32 -loleaut32 -lsetupapi -lwsock32 -lws2_32 -lIphlpapi
collect2: ld returned 1 exit status
C:\openFrameworks\apps\examples\GraphVisualOFv2>
I found a solution by setting up an environment to directly call ld.exe with
-verbose
flag and got tons of information. I actually forgot to setup opengl32 development libraries, so linker could not find them.
I am new to Qt and have one error I am unable to fix.
I have a bunch of windows (VS2005) static library file (.lib). And I am testing if they work well with Qt. So I took the most simple library that I have. (Called MessageBuffer).
So I added MessageBuffer.h to the main.cpp, and added the location of those file in the INCLUDEPATH of the .pro.
Until then everything seem fine, I can use the class and Qt IDE show all method and everything. So to me it look like it found the .h file.
Now I added the MessageBuffer.lib (VS2005/Debug build) in the .pro like this:
LIBS += E:/SharedLibrary/lib/MessageBufferd.lib
I have also tried the following:
win32:LIBS += E:/SharedLibrary/lib/MessageBufferd.lib
LIBS += -LE:/SharedLibrary/lib -lMessageBufferd
win32:LIBS += -LE:/SharedLibrary/lib -lMessageBufferd
Here is the content of my .pro file:
QT += opengl
TARGET = SilverEye
TEMPLATE = app
INCLUDEPATH += E:/SharedLibrary/MessageBuffer
SOURCES += main.cpp \
silvereye.cpp
HEADERS += silvereye.h
FORMS += silvereye.ui
OTHER_FILES +=
win32:LIBS += E:/SharedLibrary/lib/MessageBufferd.lib
They all give me the same errors: (and I get the same even if I don't include the .lib)
Running build steps for project SilverEye...
Configuration unchanged, skipping QMake step.
Starting: C:/Qt/2009.03/mingw/bin/mingw32-make.exe -w
mingw32-make: Entering directory `C:/Documents and Settings/JP/My Documents/QTProjects/SilverEye'
C:/Qt/2009.03/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Documents and Settings/JP/My Documents/QTProjects/SilverEye'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\SilverEye.exe debug/main.o debug/silvereye.o debug/moc_silvereye.o -L"c:\Qt\2009.03\qt\lib" -lopengl32 -lglu32 -lgdi32 -luser32 -lmingw32 -lqtmaind E:/SharedLibrary/lib/MessageBufferd.lib -lQtOpenGLd4 -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `C:/Documents and Settings/JP/My Documents/QTProjects/SilverEye'
mingw32-make: Leaving directory `C:/Documents and Settings/JP/My Documents/QTProjects/SilverEye'
debug/main.o: In function `Z5qMainiPPc':
C:/Documents and Settings/JP/My Documents/QTProjects/SilverEye/main.cpp:12: undefined reference to `MessageBuffer::MessageBuffer()'
C:/Documents and Settings/JP/My Documents/QTProjects/SilverEye/main.cpp:13: undefined reference to `MessageBuffer::Append(char*, int)'
C:/Documents and Settings/JP/My Documents/QTProjects/SilverEye/main.cpp:17: undefined reference to `MessageBuffer::~MessageBuffer()'
C:/Documents and Settings/JP/My Documents/QTProjects/SilverEye/main.cpp:17: undefined reference to `MessageBuffer::~MessageBuffer()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\SilverEye.exe] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project SilverEye
When executing build step 'Make'
Can anyone help please?
Based on the question Use libraries compiled with visual studio in an application compiled by g++ (mingw) and the MSDN forum post I can't mix VC & GCC it does not appear you can link a gcc application with visual c++ compiled libraries.
The solution would be to recompile everything with the same compiler.
The MinGW FAQ discusses this problem and offers a solution:
Create a definition file using reimp (for lib files) or pexports (for dll files).
Remove the underscore prefixes from the stdcall functions.
Use dlltool to convert the MSVC library into a MinGW library with the new definition.
That didn’t work. We finally removed the ordinals from the function names, which caused it to compile. But the program wouldn’t run because it couldn’t find the linked functions in the DLL. Finally, after consulting the MSDN documentation for definition files, we changed the build instructions:
Create a definition file using reimp.
For each stdcall function (formatted as _name#ordinal) add a line name = _name#ordinal, allowing MinGW to map its stdcall naming convention to that of MSVC.
Use dlltool to convert the MSVC library into a MinGW library with the new definition.
It worked! To compile the project you must simply:
Download and install the Qt/Windows package, which includes MinGW.
Download reimp and drop it into the MinGW/bin folder.
Download the development packages for the third-party libraries and point an environment variable to that location.
Build the project with the usual qmake/make commands.
Taken from:
http://blog.outofhanwell.com/2006/05/01/linking-msvc-libraries-with-mingw-projects/
I assume that you have used the MessageBuffer library in another application with problems. The error looks like it either cannot find the library or the MessageBuffer class is not being exported.
Have you tried putting -l on front of the library in the pro file?
win32:LIBS += -lE:/SharedLibrary/lib/MessageBufferd.lib
See my other answer. I added the other answer because I didn't want to make this answer any more messy than it already was.
Tried so far:
Not a typo, d is appended to the library
Using the lib extension is correct as seen in the output