http://windowssdk.msdn.microsoft.com.../ms682589.aspx << dll main
http://windowssdk.msdn.microsoft.com.../ms686912.aspx << using dlls
http://windowssdk.msdn.microsoft.com.../ms686923.aspx << load time, import library
http://windowssdk.msdn.microsoft.com.../ms686944.aspx << run-time dynamic linking
Edit: no you did not link to a dll when you specified that link option. You probably linked to an import library called libole32.a or ole32.lib (I think that's what you meant)