| | |
builds in debug but doesn't in realease
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2008
Posts: 119
Reputation:
Solved Threads: 10
I have a project that builds in a static library, using visual studio 2005
When I build it in debug mode it all goes fine, but when I build it in release i get the following error:
Error 2 error C3861: '_SCL_SECURE_VALIData': identifier not found in file xtree
I disabled optimization in release mode so that it would be similar to debug mode but the problem is still there
the outputlog looks like
Exception.cpp
C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(297) : error C3861: '_SCL_SECURE_VALIData': identifier not found
C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(288) : while compiling class template member function 'bool std::_Tree<_Traits>::const_iterator::operator ==(const std::_Tree<_Traits>::const_iterator &) const'
with
[
_Traits=std::_Tmap_traits<unsigned int,std::string,std::less<unsigned int>,std::allocator<std::pair<const unsigned int,std::string>>,false>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(413) : see reference to class template instantiation 'std::_Tree<_Traits>::const_iterator' being compiled
with
[
_Traits=std::_Tmap_traits<unsigned int,std::string,std::less<unsigned int>,std::allocator<std::pair<const unsigned int,std::string>>,false>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\map(168) : see reference to class template instantiation 'std::_Tree<_Traits>::iterator' being compiled
with
[
_Traits=std::_Tmap_traits<unsigned int,std::string,std::less<unsigned int>,std::allocator<std::pair<const unsigned int,std::string>>,false>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\map(167) : while compiling class template member function 'std::basic_string<_Elem,_Traits,_Ax> &std::map<_Kty,_Ty>::operator [](const unsigned int &)'
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ax=std::allocator<char>,
_Kty=unsigned int,
_Ty=std::string
]
c:\documents and settings\kux\my documents\visual studio 2005\projects\projviki\defps\Exception.h(18) : see reference to class template instantiation 'std::map<_Kty,_Ty>' being compiled
with
[
_Kty=unsigned int,
_Ty=std::string
]
and Exception.h:
and Exception.cpp:
When I build it in debug mode it all goes fine, but when I build it in release i get the following error:
Error 2 error C3861: '_SCL_SECURE_VALIData': identifier not found in file xtree
I disabled optimization in release mode so that it would be similar to debug mode but the problem is still there
the outputlog looks like
Exception.cpp
C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(297) : error C3861: '_SCL_SECURE_VALIData': identifier not found
C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(288) : while compiling class template member function 'bool std::_Tree<_Traits>::const_iterator::operator ==(const std::_Tree<_Traits>::const_iterator &) const'
with
[
_Traits=std::_Tmap_traits<unsigned int,std::string,std::less<unsigned int>,std::allocator<std::pair<const unsigned int,std::string>>,false>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(413) : see reference to class template instantiation 'std::_Tree<_Traits>::const_iterator' being compiled
with
[
_Traits=std::_Tmap_traits<unsigned int,std::string,std::less<unsigned int>,std::allocator<std::pair<const unsigned int,std::string>>,false>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\map(168) : see reference to class template instantiation 'std::_Tree<_Traits>::iterator' being compiled
with
[
_Traits=std::_Tmap_traits<unsigned int,std::string,std::less<unsigned int>,std::allocator<std::pair<const unsigned int,std::string>>,false>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\map(167) : while compiling class template member function 'std::basic_string<_Elem,_Traits,_Ax> &std::map<_Kty,_Ty>::operator [](const unsigned int &)'
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ax=std::allocator<char>,
_Kty=unsigned int,
_Ty=std::string
]
c:\documents and settings\kux\my documents\visual studio 2005\projects\projviki\defps\Exception.h(18) : see reference to class template instantiation 'std::map<_Kty,_Ty>' being compiled
with
[
_Kty=unsigned int,
_Ty=std::string
]
and Exception.h:
#pragma once
#include <iostream>
#include <map>
using namespace std;
#define EX_INCORRECT_DATA 0
#define EX_INCORRECT_NRPRIORITATI 1
#define EX_INCORRECT_STARTYEAR 2
#define EX_SAMECODE 3
#define EX_NOENTRY 4
class Exception
{
private:
int m_iExceptionCode;
static map<unsigned int, string> m_mapExceptions;
static bool m_bInitialized;
public:
static void InitExceptionMap();
Exception(int iExceptionCode);
string GetErrorMessage();
public:
~Exception(void);
};#include "Exception.h"
map<unsigned int, string> Exception::m_mapExceptions;
bool Exception::m_bInitialized = false;
void Exception::InitExceptionMap()
{
m_mapExceptions[EX_INCORRECT_DATA] = "Data de intrare incorecta";
m_mapExceptions[EX_INCORRECT_NRPRIORITATI] = "Nr de prioritati incorect";
m_mapExceptions[EX_INCORRECT_STARTYEAR] = "Momentul inceperii nu potriveste cu anul";
m_mapExceptions[EX_SAMECODE] = "Mai multe intrari cu acelashi cod de comanda";
m_mapExceptions[EX_NOENTRY] = "Tabela intrari goala";
m_bInitialized = true;
}
Exception::Exception(int iExceptionCode)
{
if ( ! m_bInitialized ) InitExceptionMap();
m_iExceptionCode = iExceptionCode;
}
string Exception::GetErrorMessage()
{
return m_mapExceptions[ m_iExceptionCode ];
}
Exception::~Exception(void)
{
}![]() |
Other Threads in the C++ Forum
- Previous Thread: Urgent!!Why is the first string ignored, while the others aren't ??Please thks
- Next Thread: Memory management - Advice please
| Thread Tools | Search this Thread |
api array based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





