In ARX 2021 debug version doesnot work std::regex

In ARX 2021 debug version doesnot work std::regex

majklha
Advocate Advocate
443 Views
1 Reply
Message 1 of 2

In ARX 2021 debug version doesnot work std::regex

majklha
Advocate
Advocate

If I try compile debug version of the ARX in version 2021, the std::regex library throw error: 

unresolved external symbol "__declspec(dllimport) public: static void __cdecl std::_Crt_new_delete::operator delete(void *)" (__imp_??3_Crt_new_delete@std@@SAXPEAX@Z)

and

unresolved external symbol "__declspec(dllimport) public: static void * __cdecl std::_Crt_new_delete::operator new(unsigned __int64)" (__imp_??2_Crt_new_delete@std@@SAPEAX_K@Z)

 

In release version it is compiled without error.

Id 2020 ARX debug version it is all rigth too.

 

What could be a problem?

Thanks.

 

0 Likes
Accepted solutions (1)
444 Views
1 Reply
Reply (1)
Message 2 of 2

tbrammer
Advisor
Advisor
Accepted solution

If your you have _DEBUG defined in your debug build try to include the header <regex> with _DEBUG undefined.

It is a good idea to include all required STL and system headers in the stdafx.h like this:

 

 

#if defined (_DEBUG)
	#define DEBUG_WAS_DEFINED
	#undef  _DEBUG
#endif

#include <regex>
// other STL or system includes like <vector>, <afx*.h>, ...

#ifdef DEBUG_WAS_DEFINED
	#define   _DEBUG
#endif

 

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes