Opened 16 years ago

Closed 13 years ago

#2103 closed defect (wontfix)

VC6 build problems with GDAL 1.5

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone:
Component: ConfigBuild Version: 1.5.0 betas/RCs
Severity: normal Keywords: vc6 std
Cc: Mateusz Łoskot

Description


Change History (13)

comment:1 by warmerdam, 16 years ago

Status: newassigned
        cl /nologo /MDd /EHsc /Zi /DDEBUG /D_DEBUG /Fd..\gdal.pdb -I..\port -I..
\ogr -I..\gcore  -I..\alg -DWIN32 -I. -Iogrsf_frmts -I..\frmts\gtiff\libgeotiff
    -DOGR_ENABLED  /c ogrfeaturestyle.cpp
ogrfeaturestyle.cpp
ogrfeaturestyle.cpp(1184) : error C2562: 'OGR_ST_SetUnit' : 'void' function retu
rning a value
        ogr_api.h(386) : see declaration of 'OGR_ST_SetUnit'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'c:\Software\VStudio\VC98\BIN\nmake.exe' : return cod
e '0x2'

comment:2 by warmerdam, 16 years ago

also:

        cl /nologo /MDd /EHsc /Zi /DDEBUG /D_DEBUG /Fd..\gdal.pdb -I..\port -I.
\ogr -I..\gcore  -I..\alg -DWIN32 -I. -Iogrsf_frmts -I..\frmts\gtiff\libgeotiff
    -DOGR_ENABLED  /c ogr_srs_esri.cpp
ogr_srs_esri.cpp
ogr_srs_esri.cpp(332) : error C2446: '!=' : no conversion from 'const char ** '
to 'char ** '
        Conversion loses qualifiers
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

comment:3 by warmerdam, 16 years ago

Also:

C:\warmerda\wrk\gdal\ogr\ogrsf_frmts>cd geojson   && nmake /NOLOGO /f makefile.v
c   && cd ..
        cl /nologo /MDd /EHsc /Zi /DDEBUG /D_DEBUG /Fd..\..\..\gdal.pdb -I..\..\
..\port -I..\..\..\ogr -I..\..\..\gcore  -I..\..\..\alg -I. -I.. -I..\..  /c ogr
geojsondatasource.cpp
ogrgeojsondatasource.cpp
ogrgeojsondatasource.cpp(334) : error C2039: 'size_t' : is not a member of 'std'

NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

comment:4 by warmerdam, 16 years ago

also:

        cd libtiff
        nmake /nologo /f makefile.vc
        cl /nologo /MDd /EHsc /Zi /DDEBUG /D_DEBUG /Fd..\..\..\gdal.pdb -I..\..\
..\port -I..\..\..\ogr -I..\..\..\gcore  -I..\..\..\alg -I..\..\zlib -DZIP_SUPPO
RT -DPIXARLOG_SUPPORT -I..\..\jpeg\libjpeg -DJPEG_SUPPORT -DOJPEG_SUPPORT  /c ti
f_dirread.c
tif_dirread.c
tif_dirread.c(2502) : error C2520: conversion from unsigned __int64 to double no
t implemented, use signed __int64
tif_dirread.c(658) : error C2520: conversion from unsigned __int64 to double not
 implemented, use signed __int64
tif_dirread.c(2268) : error C2520: conversion from unsigned __int64 to double no
t implemented, use signed __int64
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'c:\Software\VStudio\VC98\BIN\nmake.exe' : return cod
e '0x2'
Stop.

comment:5 by warmerdam, 16 years ago

Also:

        cl /nologo /MDd /EHsc /Zi /DDEBUG /D_DEBUG /Fd..\..\..\gdal.pdb -I..\..\
..\port -I..\..\..\ogr -I..\..\..\gcore  -I..\..\..\alg -I..\..\zlib -DZIP_SUPPO
RT -DPIXARLOG_SUPPORT -I..\..\jpeg\libjpeg -DJPEG_SUPPORT -DOJPEG_SUPPORT  /c ti
f_ojpeg.c
tif_ojpeg.c
tif_ojpeg.c(585) : error C2632: 'long' followed by 'long' is illegal
tif_ojpeg.c(587) : error C2632: 'long' followed by 'long' is illegal
tif_ojpeg.c(592) : error C2632: 'long' followed by 'long' is illegal
tif_ojpeg.c(599) : error C2632: 'long' followed by 'long' is illegal
tif_ojpeg.c(606) : error C2632: 'long' followed by 'long' is illegal
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'c:\Software\VStudio\VC98\BIN\nmake.exe' : return cod
e '0x2'
Stop.

comment:6 by warmerdam, 16 years ago

        cl /nologo /MDd /EHsc /Zi /DDEBUG /D_DEBUG /Fd..\..\gdal.pdb -I..\..\por
t -I..\..\ogr -I..\..\gcore  -I..\..\alg   /c envidataset.cpp
envidataset.cpp
envidataset.cpp(1301) : error C2374: 'i' : redefinition; multiple initialization

        envidataset.cpp(1295) : see declaration of 'i'
envidataset.cpp(1307) : error C2374: 'i' : redefinition; multiple initialization

        envidataset.cpp(1295) : see declaration of 'i'
envidataset.cpp(1313) : error C2374: 'i' : redefinition; multiple initialization

        envidataset.cpp(1295) : see declaration of 'i'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

comment:7 by warmerdam, 16 years ago

Also:

C:\warmerda\wrk\gdal\frmts>cd pds   && nmake /NOLOGO /f makefile.vc   && cd ..
        cl /nologo /MDd /EHsc /Zi /DDEBUG /D_DEBUG /Fd..\..\gdal.pdb -I..\..\por
t -I..\..\ogr -I..\..\gcore  -I..\..\alg -I..\raw  /c pdsdataset.cpp
pdsdataset.cpp
pdsdataset.cpp(580) : error C2171: '+' : illegal on operands of type 'char [13]'

NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

comment:8 by warmerdam, 16 years ago

Assorted fixes for above problems in r13365.

Some fixes in gdal/frmts/gtiff/libtiff need to be upstreamed into libtiff if we want libtiff4 to work with vc6. Leaving open till that is dealt with.

comment:9 by Mateusz Łoskot, 16 years ago

Cc: Mateusz Łoskot added

comment:10 by warmerdam, 16 years ago

Milestone: 1.5.1

Clearing 1.5.1 milestone since the only outstanding work is in libtiff.

comment:11 by mloskot, 16 years ago

Keywords: std added

Some of these errors are caused by broken std:: namespace in Visual C+++ 6.0.

I think that a clean solution is to control broken compilers with preprocessor macros. Boost does it with success, with macro BOOST_NO_STDC_NAMESPACE

Using this macro, it's easy to fix broken std::, short example

#ifdef BOOST_NO_STDC_NAMESPACE
namespace std {
   using ::size_t;
   using ::sqrt;
}
#endif

void foo()
{
   std::size_t s = 0;
   std::sqrt(4);
}

comment:12 by Mateusz Łoskot, 14 years ago

Regarding GeoJSON driver, more fixes in trunk (r18533) just in case.

comment:13 by Even Rouault, 13 years ago

Resolution: wontfix
Status: assignedclosed

Closing. Not sure anyone will care about VC6 now

Note: See TracTickets for help on using tickets.