컴파일 다하고 debug 모드에서 실행시킬려고 하니까 아래 R6034 에러(아래그림)가 떴다. (그림은 인터넷에서 가져온 것이지만 에러내용은 동일)
![](http://pds14.egloos.com/pds/200902/10/05/a0110705_499162db8a13e.jpg)
MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib "msvcrt.lib"
conflicts with use of other libs; use /NODEFAULTLIB:library
라는 warning 이 맨 마지막 줄에 있었다.... 사실 이 warning은 자주 나타나는 거라서 그냥
warning 수준에서 무시 했었는데, 암튼 혹시나 해서 구글링해서
http://www.stanford.edu/~yljiang/pages/GPRS%20Linking%20Warning.htm
에서 아래와 같은 방법을 찾아서 했더니, 에러가 사라졌다....
해서 황당해서 여기에 기록해 둔다.
Linker Tools Warning LNK4098
To use this run-time library | Ignore these libraries |
Single-threaded (libc.lib) | libcmt.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib |
Multithreaded (libcmt.lib) | libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib |
Multithreaded using DLL (msvcrt.lib) | libc.lib, libcmt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib |
Debug Single-threaded (libcd.lib) | libc.lib, libcmt.lib, msvcrt.lib, libcmtd.lib, msvcrtd.lib |
Debug Multithreaded (libcmtd.lib) | libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib |
Debug Multithreaded using DLL (msvcrtd.lib) | libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, libcmtd.lib |
/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib
그리고, 아래는 문제를 해결하고 난 이후에 찾은 글이다.
http://weblogs.asp.net/george_v_reilly/archive/2007/02/10/shell-extension-throwing-r6034-errors.aspx
Shell extension throwing R6034 errors
Microsoft Visual C++ Runtime LibraryRuntime Error!Program: C:\WINDOWS\Explorer.EXER6034An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.
verclsid
in the error dialog, though not when I took this snapshot.libcmt.lib
, instead of msvcrt.lib
, rather than figure out the necessary manifest magic.At the time of 2009 Jun 20, I got this error again and found a solution from the following (Scrapped from : http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/6d16ecce-f92b-4c53-a45b-40119c4566a6)
Hi there,
I read every post in this thread without any help in my case.
The problem turned out: The DEBUG version was trying to link with BOTH msvcr80.dll and msvcr80d.dll.
Check if this is the case for you using the "dependency walker" on your executable. If these two are both loaded, then you got the same problem as I did.
The solution is to set "Properties->Linker->Input->Ignore Specific library" to "msvcrt.lib".
More details below:
I was compiling and running a program that uses opencv library. Oneof the libraries in opencv (highgui to be exact) was linking withnon-debug versions of some graphics libraries even in its debugversion. Apparently this was OK before.
This resulted in my debug version program linking with bothmsvcr80.dll and msvcr80d.dll. It appears this is a problem since themanifest only mentions one of these libraries and the other one(msvcr80.dll) appears not to be found causing the error mentioned inthis thread. Why no-one in this thread mentioned that this could be thecase is beyond me. I found out about this using "dependency walker" onthe .exe that I compile and/or the highgui100d.dll that I load from thelibrary.
That is the reason the complaint is about msvcr80.dll and not msvcr80d.dll in VS8!!!
The fix is to re-compile highgui100d.dll (debug version) withProperties->Linker->Input->Ignore Specific library set tosingly "msvcrt.dll".
Just wanted to add this so other people do not waste time as I did...
Hakan
'MS > MFC' 카테고리의 다른 글
Manually set dropdown list for combobox on MFC (0) | 2015.03.24 |
---|---|
기존의 32bit코드를 64bit로 변경 할 때 (0) | 2014.04.14 |
SHANDLE_PTR 에러 문제 (0) | 2013.10.21 |
GDI+ 설정방법, 이미지출력, 투명화, 더블버퍼링, 이미지회전, jpg생성, 글자 출력, GDI와 데이터형 변환 (1) | 2013.09.11 |
GDI+ Double buffering (0) | 2013.09.11 |
mfcs80d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined (0) | 2013.08.09 |
CListCtrl 에서 깜빡임 없애기 & 실시간 갱신 (0) | 2013.04.11 |
비주얼 스튜디오, 디버깅 브레이크 포인트 중단점이 적중되지 않습니다... (0) | 2012.09.26 |
ActiveX 관리자 권한으로 상승하여 사용 하기 (0) | 2012.09.14 |
리스트 컨트롤(CListCtrl) 안에 공용 컨트롤(CButton, CComboBox Control 등) 넣기 (0) | 2011.11.21 |