المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Link Errors



C++ Programming
06-20-2009, 09:31 PM
I have written a small dialog based application which uses Cximage class to achieve compression. The program works fine but i have a problem which arises once i use static MFC library to compile the program. I need to use the program on other computers but it fails to work because of the problem.
I get compiler errors LNK2005 like

MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fclose already defined in libcmt.lib(fclose.obj)
these are 35 in total

I read from a forum to put libcmt.lib in Ignore Specific Library tab. The things works
but then i get 3 errors related to LNK2001 like

1>cximage.lib(ximaenc.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
1>nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
1>nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc

I even tried to use the ForceLib.h file as described in msdn forums. But to no avail. Can anyone help.
The code i need to compile is present on this website by name Image Compressor.
Regards
Hassan