[gdal-dev] debug ogr2ogr on Windows
Ivan Lucena
lucena_ivan at hotmail.com
Fri Apr 25 11:08:33 PDT 2014
Hi Martin,
If your intention was to build for 64bit and should have create the .vcproj file this way:
C:\<folder>\trunk\gdal> makegdal_gen 10.00 64 > makegdal10-trunk.vcproj
You should open it in VS 2010 and let it is job and convert to the new format.
And your nmake.local should like this:
MSVC_VER=1600
DEBUG=1
WIN64=yes
But as Even pointed our it looks like you missed some settings for the CUR library.
Whatever happens in the IDE should be the same as in command line.
The IDE is going to do what is defined in Project Properties/Configuration Properties/NMake, like for example:
Build Command Line: cd $(ProjectDir) && nmake -f makefile.vc && nmake -f makefile.vc install
You click the <edit...> option and replace the "&&" by new line.
cd $(ProjectDir)
nmake -f makefile.vc
nmake -f makefile.vc install
That is easier to read. That "&&" was introduced to fix a problem with SVN and CRLF stuff.
The only thing that could be different between typing those command in command line and running through the IDE is the compiler architecture and environment variable.
To make sure that the IDE will run nmake in a x64 environment you should change the Platform drop-down list at the center of the VS task bar to "x64", and to undefine an environmental variable you can add that to your nmake.local:
!UNDEF CURL_INC
Good luck!
> From: even.rouault at mines-paris.org
> To: gdal-dev at lists.osgeo.org
> Subject: Re: [gdal-dev] debug ogr2ogr on Windows
> Date: Fri, 25 Apr 2014 19:34:32 +0200
> CC: landa.martin at gmail.com; lucena_ivan at hotmail.com
>
> Le vendredi 25 avril 2014 19:31:08, Martin Landa a écrit :
> > Hi Ivan,
> >
> > 2014-04-24 23:27 GMT+02:00 Ivan Lucena <lucena_ivan at hotmail.com>:
> >
> > first of all, thanks a lot for very useful notes!
> >
> > > Press F7 will build everything but you don't need to do that if you have
> > > done in command line.
> >
> > I tried to build GDAL also from VC, but it ends with
> >
> > 1> lib /nologo /out:gdal.lib port\*.obj gcore\*.obj alg\*.obj
> > frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib
> > 1>nitf_gcprpc.obj : warning LNK4221: This object file does not define
> > any previously undefined public symbols, so it will not be used by any
> > link operation that consumes this library
> > 1> link /nologo /dll /INCLUDE:_OGRFeatureStylePuller
> > /INCLUDE:_OSRValidate /INCLUDE:_OPTGetProjectionMethods
> > /INCLUDE:_OGR_G_GetPointCount /INCLUDE:_OGRRegisterAll
> > /INCLUDE:_GDALSimpleImageWarp at 36 /INCLUDE:_GDALReprojectImage at 48
> > /INCLUDE:_GDALComputeMedianCutPCT at 32 /INCLUDE:_GDALDitherRGB2PCT at 28
> > /INCLUDE:_OCTNewCoordinateTransformation at 8 port\*.obj gcore\*.obj
> > alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib
> > C:\oraclexe\app\oracle\product\11.2.0\server\oci\lib\msvc\ociw32.lib
> > C:\oraclexe\app\oracle\product\11.2.0\server\oci\lib\msvc\oci.lib
> > odbc32.lib odbccp32.lib user32.lib
> > ws2_32.lib gcore\Version.res /out:gdal111.dll
> > /implib:gdal_i.lib /debug
> > 1> Creating library gdal_i.lib and object gdal_i.exp
> > 1>cpl_http.obj : error LNK2019: unresolved external symbol
> > __imp__curl_easy_setopt referenced in function "void __cdecl
> > CPLHTTPSetOptions(void *,char * *)"
> > (?CPLHTTPSetOptions@@YAXPAXPAPAD at Z)
> > 1>cpl_vsil_curl.obj : error LNK2001: unresolved external symbol
> > __imp__curl_easy_setopt
> > 1>cpl_vsil_curl_streaming.obj : error LNK2001: unresolved external
> > symbol __imp__curl_easy_setopt
> >
> > Any idea what could be wrong?
>
> Looks like you have defined CURL_INC, but not CURL_LIB in your nmake.local /
> nmake.opt
>
> >
> > > 5. Prepare a command line on Project/Properties/debug
> > >
> > > I can give more info tomorrow. I can't remember how the UI goes but is
> > > very simple.
> >
> > Thanks in advance for very valuable help! Martin
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> --
> Geospatial professional services
> http://even.rouault.free.fr/services.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140425/d2a2cb91/attachment.html>
More information about the gdal-dev
mailing list