[gdal-dev] gdal 1.6 on Windows XP build error

Gong, Shawn (Contractor) Shawn.Gong at drdc-rddc.gc.ca
Thu Dec 11 14:47:16 EST 2008


hi Frank and list,

Here is another error that I got:
C:\PROGRA~1\MICROS~3\VC__6~1\INCLUDE\math.h(514) : error C2894:
templates cannot be declared to have 'C' linkage

I searched the web and the suggested solution was moving the #include
<math.h> outside of the extern "C" thing.  But I cannon find #include
<math.h> in fileendian.cpp


thanks,
Shawn


============================
        cl /nologo /MD /EHsc /GR /Ox /W3 /DNDEBUG -I..\..\..\..\port
-I..\..\..\
..\ogr -I..\..\..\..\gcore  -I..\..\..\..\alg
-I..\..\..\..\ogr\ogrsf_frmts -I .
./g2clib-1.0.4  /c myassert.c
myassert.c
        cl /nologo /MD /EHsc /GR /Ox /W3 /DNDEBUG -I..\..\..\..\port
-I..\..\..\
..\ogr -I..\..\..\..\gcore  -I..\..\..\..\alg
-I..\..\..\..\ogr\ogrsf_frmts -I .
./g2clib-1.0.4  /c scan.c
scan.c
        cl /nologo /MD /EHsc /GR /Ox /W3 /DNDEBUG -I..\..\..\..\port
-I..\..\..\
..\ogr -I..\..\..\..\gcore  -I..\..\..\..\alg
-I..\..\..\..\ogr\ogrsf_frmts -I .
./g2clib-1.0.4  /c memendian.c
memendian.c
        cl /nologo /MD /EHsc /GR /Ox /W3 /DNDEBUG -I..\..\..\..\port
-I..\..\..\
..\ogr -I..\..\..\..\gcore  -I..\..\..\..\alg
-I..\..\..\..\ogr\ogrsf_frmts -I .
./g2clib-1.0.4  /c fileendian.cpp
fileendian.cpp
C:\PROGRA~1\MICROS~3\VC__6~1\INCLUDE\math.h(514) : error C2894:
templates cannot
 be declared to have 'C' linkage
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
        cd ..
        cd vb6
        nmake /nologo /f makefile.vc
        cl /nologo /MD /EHsc /GR /Ox /W3 /DNDEBUG -I..\port -I..\ogr
-I..\gcore
 -I..\alg -I..\ogr\ogrsf_frmts   /c vb6_support.cpp
vb6_support.cpp
        cd ..
        if exist gdal.lib del gdal.lib


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20081211/c9ee82aa/attachment.html


More information about the gdal-dev mailing list