Boost + __stdcall calling convention

Hello, I am currently programming a dll in COM format with Visual Studio 2005. For it to be in COM format, the calling convention has to be __stdcall. In my project, I need somme Boost code, just to get my life easier :) My problem is that the compiler complains in linking process : I have unresolved Boost symbols whereas I included the good .lib. I tried many workarounds, and I saw that when I change the calling convention to __cdecl, the project compiles fine. Unfortunatly I can't register the DLL with regsvr32 since the format is not correct. Is it possible to use Boost libraries with the __stdcall convention ? Do you have an idea/solution ? Thanks in advance.

AMDG cdongieux.ext@orange-ftgroup.com wrote:
I am currently programming a dll in COM format with Visual Studio 2005. For it to be in COM format, the calling convention has to be __stdcall.
In my project, I need somme Boost code, just to get my life easier :)
My problem is that the compiler complains in linking process : I have unresolved Boost symbols whereas I included the good .lib.
I tried many workarounds, and I saw that when I change the calling convention to __cdecl, the project compiles fine. Unfortunatly I can't register the DLL with regsvr32 since the format is not correct.
Is it possible to use Boost libraries with the __stdcall convention ? Do you have an idea/solution ?
You need to build the libraries using __stdcall, too. use bjam cxxflags=/Gz ... to build the libraries. In Christ, Steven Watanabe

I think it is an accepted practice to qualify all COM functions with __stdcall explicitly, rather than to change the default calling convention globally for the project. Can explicit __stdcall be an acceptable solution for you?
Regards,
Gevorg
________________________________
From: "cdongieux.ext@orange-ftgroup.com"
participants (3)
-
cdongieux.ext@orange-ftgroup.com
-
Gevorg Voskanyan
-
Steven Watanabe