gcc normally register path of dependent library at link time and try to search them at system specific location.
But if library is not located at those locations, then it fails to load.
So to force gcc to link at runtime we can use "-bnoipath".
For example :
this will force test.exe to link with xyzlib.dll at runtime.
But if library is not located at those locations, then it fails to load.
So to force gcc to link at runtime we can use "-bnoipath".
For example :
gcc -bnoipath -shared test.o -o test.exe -lxyzlib
this will force test.exe to link with xyzlib.dll at runtime.
No comments:
Post a Comment