How do I compile boost using __cdecl calling convention?
Posted
by Sorin Sbarnea
on Stack Overflow
See other posts from Stack Overflow
or by Sorin Sbarnea
Published on 2010-04-24T14:10:24Z
Indexed on
2010/04/24
14:13 UTC
Read the original article
Hit count: 412
I have a project compiled using __cdecl
calling convention (msvc2010) and I compiled boost using the same compiler using the default settings.
The project linked with boost but I at runtime I got an assert message like this: File: ...\boost\boost\program_options\detail\parsers.hpp Line: 79
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
There are the following questions:
- what calling convention does boost build with by default on Windows (msvc2010)
- how to I compile boost with __cdecl calling convention
- why boost wasn't able to prevent linking with code with different calling conventions? I understood that boost has really smart library auto-inclusion code.
© Stack Overflow or respective owner