Undefined Reference in Shared lib


I have some odd undefined reference problem from my shared lib, I look around and it seems someone describe the solution here


However, my problem is that where do I specify the compile order as above post suggested, and confirm I did the right thing in Visual studio?

g++ -I. -L. main.cpp -o main -lmylib


you can check your linker order by Project Properties>Linker>Command Line. and add more options into Additional Options.

But it is a little hard to control command order.

if the default order is not want, you can disable all the stand system lib by setting Linker>Input>Ignore All Default Libraries to yes, and then you set all your link options by additional options in Linker>Command Line.