Whenever I put my dll files in the same directory as my main.cpp and use this code,
Code:
g++ main.cpp -L. -lMyDll
it works.

but if my dll files are in the other directory,
Code:
g++ main.cpp -L/myDlls -lMyDll
it won't work. Why is this not working?