DLL: Port Issue from VS6 to VS2010
I have been banging my head against the wall for three days with an issue and no amount of googling (days worth!) has yet to turn up an answer.
A vendor tool that I use exposes its API via some C static libraries (.lib).
I have a DLL written in VS6 wherein I expose functions I have written that leverage some of these libraries functions. I export these functions using the stdcall convention. It builds and works fine.
I was attempting to migrate to VS2010 Express, but here's where I'm stuck:
- If I build a console executable out of the same VS6 code described above, everything compiles and works fine.
- If I build a cdecl DLL out of the same VS6 code described above, it compiles without errors.
- If I build a stdcall DLL out of the same VS6 code described above, I get linker errors for any function from the vendor API library saying: "error LNK2019: unresolved external symbol _<vendor_function>@N"
I'm at a loss as to why I can easily build an stdcall DLL with VC6 but cannot do so with the same code in VS2010.
I would be grateful for smarter people to kick some ideas around with.