I did some Googl'ing and kept coming across different issues of the same kind where people would say to make sure the. so file actually exists and if it doesn't, then create a symlink to the versioned file, for example, zlib.so.1.2.8. So, I thought, surely that couldn't be the problem. I came across another post on the Internets that suggested to run make with LD_DEBUG=all: LD_DEBUG=all makeĪlthough I got a TON of debugging output, it wasn't actually helpful. I thought to actually check the help text for the ld command: ld -helpįrom that, I figured out how to run ld in verbose mode (imagine that): ld -lzlib -verbose It added more confusion than anything else. So, to finally fix it so I could compile MySQL with my own version of ZLIB (rather than the bundled version): sudo ln -s /usr/lib/libz.so.1.2.8 /usr/lib/libzlib.so This is the output I got: =Īttempt to open /usr/x86_64-linux-gnu/lib64/libzlib.so failedĪttempt to open /usr/x86_64-linux-gnu/lib64/libzlib.a failedĪttempt to open /usr/local/lib64/libzlib.so failedĪttempt to open /usr/local/lib64/libzlib.a failedĪttempt to open /usr/lib64/libzlib.so failedĪttempt to open /usr/lib64/libzlib.a failedĪttempt to open /usr/x86_64-linux-gnu/lib/libzlib.so failedĪttempt to open /usr/x86_64-linux-gnu/lib/libzlib.a failedĪttempt to open /usr/local/lib/libzlib.so failedĪttempt to open /usr/local/lib/libzlib.a failedĪttempt to open /usr/lib/libzlib.so failedĪttempt to open /usr/lib/libzlib.a failed #SERIAL NUMBER SIMPLY FORTRAN 2.28 HOW TO# ![]() In this case you should supply the g++ with the following options: g++ main.cpp -o main -L/home/taylor -lswift When g++ says cannot find -l, it means that g++ looked for the file lib in addition to default paths.Įxample: Assuming you have a library at /home/taylor/libswift.so, and you want to link your app to this library. Note 1: -l option gets the library name without lib and. Note 2: In some cases, the library file name is followed by its version, for instance libswift.so.1.2. ![]() In these cases, g++ also cannot find the library file. A simple workaround to fix this is creating a symbolic link to libswift.so.1.2 called libswift.so. ![]() When you link your app to a shared library, it's required that library stays available whenever you run the app. #SERIAL NUMBER SIMPLY FORTRAN 2.28 HOW TO#.
0 Comments
Leave a Reply. |