I'm compiling a DLL which needs to use portaudio. It uses all sorts of windows libraries for sockets and such too, but the linker wouldn't recognize the portaudio library. Then I remembered portaudio uses __cdcel instead of __stdcall. Normally I would just use __cdcel and be done with it, but the DLL I'm compiling needs to use __stdcall because I'm going to use it with Visual Basic.
And if this project sounds like a bit of a kludge to you, it is.
Stupid me! All I have to do is use __cdcel and declare the exported functions as __stdcall!