Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

gcc linker not finding linked libraries

$
0
0

I'm porting a small program to run on my RPi from my windows machine. The code is correctly ported but I'm having some issues with the linking process. Googling or searching on here has yielded nothing that worked. My .so files are correctly lying in the /mnt/client/dbg/ directory on external storage, can that be an issue?

g++ -shared -o dbg/socketwrappers.so socketwrappers.og++ -shared -o dbg/mylibrary2.so mylibrary2.og++ -shared -o dbg/mylibrary3.so mylibrary3.og++ -L/mnt/client/dbg/ -o dbg/client client.cpp -lsocketwrappers -lmylibrary2 -lmylibrary3/usr/bin/ld: cannot find -lsocketwrappers/usr/bin/ld: cannot find -lmylibrary2/usr/bin/ld: cannot find -lmylibrary3

Filetree from pwd (/mnt/client):
├── ./dbg
│  ├── /socketwrappers.so
│  ├── /mylibrary2.so
│  └── /mylibrary3.so
├── ./makefile
└── ./client.cpp


Viewing all articles
Browse latest Browse all 22113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>