Windows: Using MFC, get unresolved external symbol errors for __argv, __argc, __mbctype
I am trying to use the MFC library. In the project c/c++ code generation type, I have changed the runtime library to Multithreaded DLL.
When I then compile the program it links with the multi threaded libraries but I get the following errrors:
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
The solution: When you use the multithreaded dll's in visual c++.NET, you need to specify that you are using MFC in a shared dll. This is specified in the project settings.
전체 목록 보기 목록안의 메시지 1 글쓴이:tony shih (firstname.lastname@example.org) 제목:How to debug ATL com's in ASP View this article only 뉴스그룹:microsoft.public.vc.atl 날짜:2001-11-13 00:35:08 PST this covers ->Debugging ATL dll s in medium pooled ASP application in local server mode apply for IIS out of process application as well ============================================================= FIRST SETUP IIS (5.0) AS FOLLOWS 1. open internet infomation services 2. right click your web site 3. select properties 4. select "Home Directory" tab 5. then select "Application Protection" drop down from that select "Medium Pooled" **Browse your asp page which uses the DLL / DLLs GETTING THE PID FOR DLLHOST 1. Open components servcies 2. select COM+ applications (do not expand any) 3. select status view 4. get the PID from right hand side pane for IIS In - Process Applications SETUP YOUR VC++ ENVIRONMENT 1. Install latest visual studio service pack (down load from beloved microsoft site) 2. Open microsoft vc++ from program files 3. select build option 4. select start debug select attach to process 5. select show systems processes check box 6. your previously noted PID will appear 7. select/dbl click that one 8. goto projects option 9. select settings 10. select debug tab 11. select Category drop down 12. select additional dlls option 13. attach all your req/project dlls (all the dlls must have build as a win32 debug build to load symbolic info) 14. Click OK 15 select File option from VC++ pull down menu 16. Select open all the .CPP an .H files where u wanna set break points 17. Refresh the asp page you have browse your component will hit the break point Defineitly Happy debugging thanks Tony Shih MCSD 목록안의 메시지 2 글쓴이:Allen Weng (email@example.com) 제목:RE: How to debug ATL com's in ASP View this article only 뉴스그룹:microsoft.public.vc.atl 날짜:2001-11-14 18:20:45 PST A good article " Debugging Distributed Web Applications" by Anand Rajagopalan in MSDN. It's also very helpful. It provides insight into the different tools used to debug Distributed Web Applications. Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.