Undefined Reference in Shared lib

Hello,

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

http://stackoverflow.com/questions/12748837/c-shared-library-undefined-reference-to-fooclasssayhello

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

Thanks!

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.