CBasicNet
August 31st, 2003, 09:33 PM
Hi guys,
I have made a "picture to ASCII" converter. I have a problem here; I cannot "Use MFC in a static Library", I can only link dynamically. I need to link statically as I want to distribute my program to my friends. To know more, please click on the link in my signature.
I use the CxImage from
here (http://www.codeproject.com/bitmap/cximage.asp)
These are the linkage errors and warnings I have,
AsciiArt error LNK2005: _fclose already defined in libcmt.lib(fclose.obj)
AsciiArt error LNK2005: _fread already defined in libcmt.lib(fread.obj)
AsciiArt error LNK2005: _fwrite already defined in libcmt.lib(fwrite.obj)
AsciiArt error LNK2005: _fseek already defined in libcmt.lib(fseek.obj)
AsciiArt error LNK2005: _ftell already defined in libcmt.lib(ftell.obj)
AsciiArt error LNK2005: _fflush already defined in libcmt.lib(fflush.obj)
AsciiArt error LNK2005: _free already defined in libcmt.lib(free.obj)
AsciiArt error LNK2005: _malloc already defined in libcmt.lib(malloc.obj)
AsciiArt error LNK2005: _realloc already defined in libcmt.lib(realloc.obj)
AsciiArt error LNK2005: _strncpy already defined in libcmt.lib(strncpy.obj)
AsciiArt error LNK2005: _calloc already defined in libcmt.lib(calloc.obj)
AsciiArt error LNK2005: _sprintf already defined in libcmt.lib(sprintf.obj)
AsciiArt error LNK2005: _strncmp already defined in libcmt.lib(strncmp.obj)
AsciiArt error LNK2005: _isprint already defined in libcmt.lib(_ctype.obj)
AsciiArt error LNK2005: _memmove already defined in libcmt.lib(memmove.obj)
AsciiArt error LNK2005: _abort already defined in libcmt.lib(abort.obj)
.....
AsciiArt warning LNK4006: _fclose already defined in libc.lib(fclose.obj); second definition ignored
AsciiArt warning LNK4006: _fread already defined in libc.lib(fread.obj); second definition ignored
AsciiArt warning LNK4006: _fwrite already defined in libc.lib(fwrite.obj); second definition ignored
AsciiArt warning LNK4006: _fseek already defined in libc.lib(fseek.obj); second definition ignored
AsciiArt warning LNK4006: _ftell already defined in libc.lib(ftell.obj); second definition ignored
AsciiArt warning LNK4006: _fflush already defined in libc.lib(fflush.obj); second definition ignored
AsciiArt warning LNK4006: _free already defined in libc.lib(free.obj); second definition ignored
AsciiArt warning LNK4006: _malloc already defined in libc.lib(malloc.obj); second definition ignored
AsciiArt warning LNK4006: _realloc already defined in libc.lib(realloc.obj); second definition ignored
AsciiArt warning LNK4006: _strncpy already defined in libc.lib(strncpy.obj); second definition ignored
AsciiArt warning LNK4006: _calloc already defined in libc.lib(calloc.obj); second definition ignored
AsciiArt warning LNK4006: _sprintf already defined in libc.lib(sprintf.obj); second definition ignored
AsciiArt warning LNK4006: _isprint already defined in libc.lib(_ctype.obj); second definition ignored
AsciiArt warning LNK4006: _memmove already defined in libc.lib(memmove.obj); second definition ignored
AsciiArt warning LNK4006: _abort already defined in libc.lib(abort.obj); second definition ignored
........
There are more but I think they are the same. I tried to set the libraries from Multithreaded to Single threaded, I still get the same errors.
However, when I linked dynamically, eveything went smoothly.
I have made a "picture to ASCII" converter. I have a problem here; I cannot "Use MFC in a static Library", I can only link dynamically. I need to link statically as I want to distribute my program to my friends. To know more, please click on the link in my signature.
I use the CxImage from
here (http://www.codeproject.com/bitmap/cximage.asp)
These are the linkage errors and warnings I have,
AsciiArt error LNK2005: _fclose already defined in libcmt.lib(fclose.obj)
AsciiArt error LNK2005: _fread already defined in libcmt.lib(fread.obj)
AsciiArt error LNK2005: _fwrite already defined in libcmt.lib(fwrite.obj)
AsciiArt error LNK2005: _fseek already defined in libcmt.lib(fseek.obj)
AsciiArt error LNK2005: _ftell already defined in libcmt.lib(ftell.obj)
AsciiArt error LNK2005: _fflush already defined in libcmt.lib(fflush.obj)
AsciiArt error LNK2005: _free already defined in libcmt.lib(free.obj)
AsciiArt error LNK2005: _malloc already defined in libcmt.lib(malloc.obj)
AsciiArt error LNK2005: _realloc already defined in libcmt.lib(realloc.obj)
AsciiArt error LNK2005: _strncpy already defined in libcmt.lib(strncpy.obj)
AsciiArt error LNK2005: _calloc already defined in libcmt.lib(calloc.obj)
AsciiArt error LNK2005: _sprintf already defined in libcmt.lib(sprintf.obj)
AsciiArt error LNK2005: _strncmp already defined in libcmt.lib(strncmp.obj)
AsciiArt error LNK2005: _isprint already defined in libcmt.lib(_ctype.obj)
AsciiArt error LNK2005: _memmove already defined in libcmt.lib(memmove.obj)
AsciiArt error LNK2005: _abort already defined in libcmt.lib(abort.obj)
.....
AsciiArt warning LNK4006: _fclose already defined in libc.lib(fclose.obj); second definition ignored
AsciiArt warning LNK4006: _fread already defined in libc.lib(fread.obj); second definition ignored
AsciiArt warning LNK4006: _fwrite already defined in libc.lib(fwrite.obj); second definition ignored
AsciiArt warning LNK4006: _fseek already defined in libc.lib(fseek.obj); second definition ignored
AsciiArt warning LNK4006: _ftell already defined in libc.lib(ftell.obj); second definition ignored
AsciiArt warning LNK4006: _fflush already defined in libc.lib(fflush.obj); second definition ignored
AsciiArt warning LNK4006: _free already defined in libc.lib(free.obj); second definition ignored
AsciiArt warning LNK4006: _malloc already defined in libc.lib(malloc.obj); second definition ignored
AsciiArt warning LNK4006: _realloc already defined in libc.lib(realloc.obj); second definition ignored
AsciiArt warning LNK4006: _strncpy already defined in libc.lib(strncpy.obj); second definition ignored
AsciiArt warning LNK4006: _calloc already defined in libc.lib(calloc.obj); second definition ignored
AsciiArt warning LNK4006: _sprintf already defined in libc.lib(sprintf.obj); second definition ignored
AsciiArt warning LNK4006: _isprint already defined in libc.lib(_ctype.obj); second definition ignored
AsciiArt warning LNK4006: _memmove already defined in libc.lib(memmove.obj); second definition ignored
AsciiArt warning LNK4006: _abort already defined in libc.lib(abort.obj); second definition ignored
........
There are more but I think they are the same. I tried to set the libraries from Multithreaded to Single threaded, I still get the same errors.
However, when I linked dynamically, eveything went smoothly.