[gdal-dev] gdal build error on Windows with Jasper
Gong, Shawn (Contractor)
Shawn.Gong at drdc-rddc.gc.ca
Wed Aug 5 17:12:29 EDT 2009
hi list,
I downloaded the 2009-08-03 daily stable gdal and built on Windows using
MS VS 2005.
First I tried without Jasper and it went fine. After I uncommented these
lines:
# Uncomment for JasPer based JPEG2000 support
JASPER_DIR = C:\build2\jasper-1.900.1
JASPER_INCLUDE = -I$(JASPER_DIR)\src\libjasper\include
-DJAS_WIN_MSVC_BUILD
JASPER_LIB =
$(JASPER_DIR)\src\msvc\win32_release\libjasper.lib
# Uncomment the following line if you have patched
UUID-enabled version
# of JasPer from ftp://ftp.remotesensing.org/gdal/
#JASPER_INCLUDE = $(JASPER_INCLUDE) -DHAVE_JASPER_UUID
and I got the linking error as below. Would someone tell me why?
Jasper was downloaded from http://www.ece.uvic.ca/~mdadams/jasper/ and
built using the same MS VS 2005 (batch build its projects)
thanks,
Shawn
cl /nologo /MD /EHsc /Ox /W3 /D_CRT_SECURE_NO_DEPRECATE
/D_CRT_NONSTDC_N
O_DEPRECATE /DNDEBUG -I..\port -I..\ogr -I..\gcore -I..\alg
-I..\ogr\ogrsf_frmt
s -DOGR_ENABLED /c vb6_support.cpp
vb6_support.cpp
cd ..
if exist gdal.lib del gdal.lib
lib /nologo /out:gdal.lib port\*.obj gcore\*.obj alg\*.obj
frmts\o\*.obj
ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib vb6\vb6_support.obj
ogrsf_frmts.lib(parsexsd.obj) : warning LNK4221: no public symbols
found; archiv
e member will be inaccessible
link /nologo /dll /INCLUDE:_OGRFeatureStylePuller
/INCLUDE:_OSRValidate
/INCLUDE:_OPTGetProjectionMethods /INCLUDE:_OGR_G_GetPointCount
/INCLUDE:_OG
RRegisterAll /INCLUDE:_GDALSimpleImageWarp at 36
/INCLUDE:_GDALReprojectImage at 48
/INCLUDE:_GDALComputeMedianCutPCT at 32 /INCLUDE:_GDALDitherRGB2PCT at 28
/INCLUDE:_
OCTNewCoordinateTransformation at 8 /INCLUDE:_vbSafeArrayToPtr at 16
port\*.obj gcore\
*.obj alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib
ogr\ogr.lib vb6\vb
6_support.obj odbc32.lib odbccp32.lib user32.lib
/LIBPATH:C:\build2\HDF4
1r5\lib Ws2_32.lib
C:\build2\jasper-1.900.1\src\msvc\win32_release\libjasper.li
b C:\build2\netcdf-3.5.0\lib\netcdf.lib
C:\build2\proj-4.6.1\src\proj_i
.lib C:\build2\HDF5-166-win-vs2005\dll\hdf5dll.lib
C:\build2\szip21\dll\szli
bdll.lib gcore\Version.res /out:gdal16.dll /implib:gdal_i.lib
LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in
MSVCRT.lib(MS
VCR80.dll)
LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter_noinfo
already defin
ed in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already
defined in MS
VCRT.lib(MSVCR80.dll)
LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null already defined
in MSVC
RT.lib(MSVCR80.dll)
LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already
defined in MS
VCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in
MSVCRT.l
ib(MSVCR80.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in
MSVCRT.
lib(MSVCR80.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in
MSVCRT.lib(MSV
CR80.dll)
LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt already defined in
MSVCRT.
lib(MSVCR80.dll)
LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in
MSVCRT.lib(MS
VCR80.dll)
LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in
MSVCRT.lib(MSVC
R80.dll)
LIBCMT.lib(mbctype.obj) : error LNK2005: __getmbcp already defined in
MSVCRT.lib
(MSVCR80.dll)
LIBCMT.lib(setlocal.obj) : error LNK2005: _setlocale already defined in
MSVCRT.l
ib(MSVCR80.dll)
LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already
defined in MS
VCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in
MSVCRT.lib(
cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in
MSVCRT.lib(
cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in
MSVCRT.lib(
cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in
MSVCRT.lib(
cinitexe.obj)
LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)"
(?terminat
e@@YAXXZ) already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(calloc.obj) : error LNK2005: _calloc already defined in
MSVCRT.lib(MS
VCR80.dll)
LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already defined in
MSVCRT.lib(
MSVCR80.dll)
LIBCMT.lib(strftime.obj) : error LNK2005: _strftime already defined in
MSVCRT.li
b(MSVCR80.dll)
LIBCMT.lib(lconv.obj) : error LNK2005: _localeconv already defined in
MSVCRT.lib
(MSVCR80.dll)
LIBCMT.lib(getenv.obj) : error LNK2005: _getenv already defined in
MSVCRT.lib(MS
VCR80.dll)
LIBCMT.lib(tolower.obj) : error LNK2005: _tolower already defined in
MSVCRT.lib(
MSVCR80.dll)
LIBCMT.lib(strnicmp.obj) : error LNK2005: __strnicmp already defined in
MSVCRT.l
ib(MSVCR80.dll)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __stricmp already defined in
LIBCMT.lib
(stricmp.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __strdup already defined in
LIBCMT.lib(
strdup.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __unlink already defined in
LIBCMT.lib(
unlink.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __close already defined in
LIBCMT.lib(c
lose.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: __open already defined in
LIBCMT.lib(op
en.obj)
Creating library gdal_i.lib and object gdal_i.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
libs; us
e /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
libs; us
e /NODEFAULTLIB:library
LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main
reference
d in function ___tmainCRTStartup
gdal16.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\l
ink.EXE"' : return code '0x460'
Stop.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090805/5857f4ec/attachment-0001.html
More information about the gdal-dev
mailing list