Hi,
I am using visual studio 2005 on a winxp machine.
Using make files through the visual studio 2005 command prompt. I have compiled libjpeg, zlib and libtiff. Now I am trying to compile little cms, but failing miserably.
I get the following linker errors:
2>Linking...
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strncmp already defined in LIBCMT.lib(strncmp.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _realloc already defined in LIBCMT.lib(realloc.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _vfprintf already defined in LIBCMT.lib(vfprintf.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fprintf already defined in LIBCMT.lib(fprintf.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: ___iob_func already defined in LIBCMT.lib(_file.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: _sprintf already defined in LIBCMT.lib(sprintf.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __read already defined in LIBCMT.lib(read.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __write already defined in LIBCMT.lib(write.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __lseek already defined in LIBCMT.lib(lseek.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __close already defined in LIBCMT.lib(close.obj)
2>MSVCRT.lib(MSVCR80.dll) : error LNK2005: __open already defined in LIBCMT.lib(open.obj)
2>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
2>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
2>..\..\bin\tifficc.exe : fatal error LNK1169: one or more multiply defined symbols found
2>Build log was saved at "file://c:\lib\lcms-1.17\lcms-1.17\Projects\VC2005\tifficcDebug\BuildLog.htm"
From what I have googled its likely a crt issue, but I have no idea how to proceed or what to attempt to remedy the issue.
Any guidance or advice will be appreciated!
j_galan
Probably CRT Hell with lcms
Re: Probably CRT Hell with lcms
Hello
With VC6 (it's probable the same with 2005):
Open the project settings, click the 'Link' tab, select 'Input' in the 'Category' combobox and enter LIBCMT in the 'Ignore libraries' field
With VC6 (it's probable the same with 2005):
Open the project settings, click the 'Link' tab, select 'Input' in the 'Category' combobox and enter LIBCMT in the 'Ignore libraries' field
Re: Probably CRT Hell with lcms
Thanks jpiquemal. That did it. A million thanks.
Quick question if I may:
The tifficc.exe I compiled seems to have a dependency to libjpeg.dll (jpeg62.dll). Is that a requirement, or have I compiled libtiff incorrectly?
j_galan
Quick question if I may:
The tifficc.exe I compiled seems to have a dependency to libjpeg.dll (jpeg62.dll). Is that a requirement, or have I compiled libtiff incorrectly?
j_galan
Re: Probably CRT Hell with lcms
the TIFF fomat can use several compression algorithms, including JPEG.
that's why you need the libjpeg if you keep the JPEG compression in tiff.
you should be able to remove the jpeg compression by commenting
#define COMPRESSION_JPEG 7 in tiff.h
that's why you need the libjpeg if you keep the JPEG compression in tiff.
you should be able to remove the jpeg compression by commenting
#define COMPRESSION_JPEG 7 in tiff.h
Re: Probably CRT Hell with lcms
commenting out #define COMPRESSION_JPEG 7 in tiff.h
results in the following compiler errors:
tif_getimage.c(351) : error C2065: 'COMPRESSION_JPEG' : undeclared identifier
tif_getimage.c(351) : error C2051: case expression not constant
tif_jpeg.c
tif_jpeg.c(1853) : error C2065: 'COMPRESSION_JPEG' : undeclared identifier
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\n
make.EXE"' : return code '0x2'
Stop.
results in the following compiler errors:
tif_getimage.c(351) : error C2065: 'COMPRESSION_JPEG' : undeclared identifier
tif_getimage.c(351) : error C2051: case expression not constant
tif_jpeg.c
tif_jpeg.c(1853) : error C2065: 'COMPRESSION_JPEG' : undeclared identifier
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\n
make.EXE"' : return code '0x2'
Stop.
Re: Probably CRT Hell with lcms
remove JPEG_SUPPORT from the Preprocessor definitions