I am using a dev system where I have to specify the lib name when accessing a function inside it.
I\'ve used functions like open() before, and somehow found out that
When I cross-compile Windows applications on Linux, if I have an issue with linking I tend to use this script that I named mingw-findin. A similar script could be used for regular Linux compilation, just instead of using the mingw alternative, use regular nm and instead of looking in the cross-compile prefixed directory, look in /usr/lib. To use this script, I run
./mingw-findin NameOfFunction
Here's the code:
#!/bin/sh
liblist=` ls /usr/x86_64-w64-mingw32/lib `
for i in $liblist
do
if x86_64-w64-mingw32-nm /usr/x86_64-w64-mingw32/lib/$i | grep -q $1; then
echo $i
x86_64-w64-mingw32-nm /usr/x86_64-w64-mingw32/lib/$i | grep $1
fi
done