Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linker Error Using Visual C++

Status
Not open for further replies.

davidelijahcooper

Programmer
Aug 22, 2002
1
GB
How do I call a function from Visual C++ which does not use MFC support from a project that uses MFC support. The error messages when trying to build the project (with MFC support) is as follows:

LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library

LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other libs; use /NODEFAULTLIB:library

ConsoleDlg.obj : error LNK2001: unresolved external symbol "int __cdecl panel_tests(int)" (?panel_tests@@YAHH@Z)
..\\..\\Bin\\daswitch.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe.
daswitch.exe - 2 error(s), 2 warning(s)
 
The problem is that some of the libraries have been built as multithreaded (libcmtd) and others as single threaded (libcd). The best way around this is to build everything as multithreaded.

With the panel_tests error, all it is saying is that you have not included the module that defines this routine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top