1.没有用mfc appwizard 而是通过创建win32 application建立的 但当下次打开的时候 连接出现错误Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/1ex_1.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
这该如何解决.
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/1ex_1.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
这该如何解决.
解决方案 »
- 新手求助 哈夫曼树&&递归调用&&文件IO流的问题
- 关于多个桌面下如何启用主题效果?
- 怎么在窗口初始化时设置可以改变窗口大小(就是可以用鼠标拖动改变窗口大小)?
- 修改注册表进行文件关联后可以执行,但是图标有时不能立即更新,怎么办?
- 自己写的一个CString类,自己实现了部分功能,大家来提点意见!!!
- 请教高手:关于CListView显示网格线!!
- 使用函数InterlockedIncrement(&m_index)出现的问题
- 先散1000分,抗议某些人滥用职权!!!(1)
- CSplitterWnd类 切分窗口问题
- 怎样把焦点从CFormView中的一个Button移到另一个Button?
- 请问哪里有Numega DevPartner6.8下载, 有高分。
- 怎样使我的Dialog的EDIT BOX里的文本被选中的状态,
--------------------------------------------------------------------------------
The information in this article applies to:The Microsoft C/C++ Compiler (CL.EXE)
Microsoft Visual C++, 32-bit Editions, versions 2.0, 2.1, 4.0, 4.1
Microsoft Visual C++, 32-bit Enterprise Edition, version 4.2
Microsoft Visual C++, 32-bit Professional Edition, version 4.2
Microsoft Visual C++, 32-bit Enterprise Edition, version 5.0
Microsoft Visual C++, 32-bit Professional Edition, version 5.0
Microsoft Visual C++, 32-bit Enterprise Edition, version 6.0
Microsoft Visual C++, 32-bit Professional Edition, version 6.0
Microsoft Visual C++, 32-bit Learning Edition, version 6.0--------------------------------------------------------------------------------
SYMPTOMS
When compiling an MFC application using the single-threaded run-time library, you receive the following two unresolved external error messages:
nafxcwd.lib(thrdcore.obj) : error LNK2001:
unresolved external symbol "__beginthreadex" nafxcwd.lib(thrdcore.obj) : error LNK2001:
unresolved external symbol "__endthreadex" CAUSE
Starting with version 3.0, all MFC classes are "thread safe" and require the multi-threaded run-time libraries to link successfully. Many people try to use the single-threaded run-time libraries because they assume these libraries are needed to enable the application to run in Win32s. This is not the case. MFC versions 3.0 and later will use a single thread, so as long as you are not creating additional threads in the application, the application will run under Win32s. RESOLUTION
To avoid these unresolved external errors, do not set the Project Settings to Single-Threaded for an MFC version 3.0 or later application. This setting can be changed by doing the following: On Visual C 2.x, 5.0, and 6.0: Select the PROJECT menu (and continue Steps 2 through 5 below).
On Visual C 4.x:
Select the Build menu.
Select the SETTINGS... option.
Select the tab, C/C++.
Select CODE GENERATION on the Category list box.
Finally, make a selection other than SINGLE-THREADED on the Use Run Time Library list box.STATUS
This behavior is by design. MORE INFORMATION
For Win32s, MFC versions 3.0 and later do not create additional threads. However, the MFC does make use of Thread Local Storage (TLS) in the multithreaded libraries to provide per-process data in DLLs that are used by multiple applications under Win32s. In the Project Settings dialog box, if you select the run-time library option to link "Multithreaded using DLL," you can take advantage of using the shared DLL, MSVCRTx0.DLL (where "x" represents the major version of Visual C++). There are separate versions of MSVCRTx0.DLL for Windows NT and Win32s that cannot be interchanged. "Multithreaded using DLL" is required when building an AFXDLL. Linking to the multithreaded libraries may cause multiple defined symbol errors. This usually occurs when the application uses user-created or third-party static libraries that were created as single-threaded. The best solution in this case is to rebuild the static libraries to use the same library options as MFC (either /MT or /MD, depending on which MFC lib is used). In this case, you may be able to use /NOD:LIBC.LIB. However, if the static library accesses any static global C Run-Time data such as _errno or stdin, you will get unresolved externals on these symbols. One solution which will always work is to isolate the single-threaded code into a DLL, and call it, protected by semaphores, from the multithreaded MFC code. REFERENCES
For more information about the run-time library options, see the section titled "Code Generation Category" in Chapter 20 of the Visual C++ "User's Guide." Or refer to the following article in the Visual C++ Books Online:
- Visual C++ Books
- User's Guides
- Visual C++ User's Guide
- Setting Compiler Options
- Setting Compiler Options
- Code Generation
- Use Run-Time Library Additional query words: 3.00 9.00 Keywords : kbCompiler kbLinker kbMFC kbVC200 kbVC210 kbVC400 kbVC410 kbVC420 kbVC500 kbVC600 kbGrpDSMFCATL
Issue type : kbprb
Technology :
Last Reviewed: May 6, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.
--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.
还有侃侃是不是路径不对!
别的应该没有问题!
还有少不少头文件的包含!
还有侃侃是不是路径不对!
别的应该没有问题!
还有少不少头文件的包含!