Re: Debug mode won't build. Release does.
- From: Victor Bazarov <v.Abazarov@xxxxxxxxxxxx>
- Date: Wed, 11 Jan 2006 10:14:10 -0500
Lady_A wrote:
I've written a static lib which does not use MFC or ATL, just STL.
The settings are Multi-Threaded Debug and Multi-Threaded for Debug and Release respectively.
The calling convetion is __cdecl.
It compiles and links in Debug and Release.
To test that lib I've written a basic console exe that has only 2 lines in its main.
It creates an instance of a class from that lib and calls a function on that class.
Nothing else.
It is also set to Multi-Threaded Debug and Multi-Threaded and __cdecl.
It compiles and links in Release.
But it refuses to compile in Debug mode!
Giving out :
"
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\malloc.h(122): error C2059: syntax error : 'constant'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\malloc.h(128): error C2059: syntax error : 'string'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\malloc.h(127): error C2733: second C linkage of overloaded function '_aligned_malloc_dbg' not allowed
"
and etc., according to the funcs in malloc.h file.
It seems like it somehow uses C libraries instead of C++.
I've compared the Debug and Release settings a thousand times. Did not find anything wrong.
Could someone help please ?
Well, without the ability to sit down at your computer and quickly look things up, I can only tell you to output the results of preprocessing to a separate file and look at the line that gives you the error and at the text immediately preceding it. Compare it to the original code (in the header) and see what macros expanded to what. It is likely that you have some macro interfering with the compilation of Microsoft headers and the interfering macro is defined differently for debug and release modes.
V .
- Prev by Date: Porting Unmanaged VC++ code from 2003 to 2005
- Next by Date: Re: Porting Unmanaged VC++ code from 2003 to 2005
- Previous by thread: Porting Unmanaged VC++ code from 2003 to 2005
- Next by thread: Re: VS2005 - Disable automatic IntelliSense updating?
- Index(es):
Relevant Pages
|