[Gdal-dev] Little link pb gdal_contour (Windows MSVC++)

Julien Demaria dem at acri-st.fr
Mon Dec 15 11:17:56 EST 2003


Frank,

gdal_contour still doesn't compile :

         cl /nologo /Ox /MD -I..\port -I..\ogr -I..\gcore  -I..\frmts 
-I..\alg gd
al_contour.cpp  ..\gdal_i.lib  /link
gdal_contour.cpp
gdal_contour.cpp(249) : warning C4508: 'main' : function should return a value;
'void' return type assumed
    Creating library gdal_contour.lib and object gdal_contour.exp
gdal_contour.obj : error LNK2001: unresolved external symbol 
_GDALContourGenerat
e
gdal_contour.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'e:\PROGRA~1\MICROS~2\VC98\BIN\NMAKE.EXE' : 
return co
de '0x2'
Stop.

Ideas ?

Thanks in advance,

Julien


At 11:00 15/12/2003 -0500, you wrote:
>Julien Demaria wrote:
>>Hi,
>>little fix to build gdal_contour.exe under Windows with MSVC++ :
>>
>>dem at dem /cygdrive/e/acri/cvs_checkout/gdal
>>$ cvs diff apps/makefile.vc
>>Index: apps/makefile.vc
>>===================================================================
>>RCS file: /cvsroot/osrs/gdal/apps/makefile.vc,v
>>retrieving revision 1.17
>>diff -r1.17 makefile.vc
>>38,40c38,40
>><       $(CC) $(CFLAGS) $(XTRAFLAGS) gdal_contour.cpp $(XTRAOBJ) $(LIBS) \
>><               /link $(LINKER_FLAGS)
>><
>>---
>>  >       $(CC) $(CFLAGS) $(XTRAFLAGS) gdal_contour.cpp ../alg/contour.obj \
>>  >               $(XTRAOBJ) $(LIBS) /link $(LINKER_FLAGS)
>
>Julien,
>
>The contour.obj is already in GDAL11.dll, so this shouldn't be necessary.
>I think the problem is that some of the contour functions were declared 
>without
>the CPL_DLL attribute so they weren't exported from the DLL.  I have fixed
>this in gdal/alg/gdal_alg.h, and committed the change.
>
>Best regards,
>
>--
>---------------------------------------+--------------------------------------
>I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush    | Geospatial Programmer for Rent
>
>
>_______________________________________________
>Gdal-dev mailing list
>Gdal-dev at remotesensing.org
>http://remotesensing.org/mailman/listinfo/gdal-dev





More information about the Gdal-dev mailing list