4/30/2013

A problem of link error in release mode of WTL

Although, it is well compiled in debug mode without any link error, we will see below link error in release mode of WTL.

LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in atlmincrt.lib(atlinit.obj)
LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null already defined in atlmincrt.lib(atlinit.obj)
LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in atlmincrt.lib(atlinit.obj)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __get_osplatform already defined in atlmincrt.lib(atlinit.obj)


Some typical solution to tackle for this,
1)Set 'Minimize CRT in Use in ATL' to 'NO' in project setting.
   In this case, the size of file will be slightly increased.

2)Or Set 'ignore', the item of 'atlmincrt.lib' in linker option.


No comments:

Post a Comment