kux 55 Junior Poster

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:

#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);
};

and Exception.cpp:

#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)
{
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.