[gdal-dev] Re: GDAL link problem on MS Visual Express 2010

canduc17 candini at meeo.it
Mon Sep 26 02:37:11 EDT 2011


I repost it because in the previous version, raw text has disappeared from
this message mail.

-------------------------------------------------------------------------------------------------------

I've followed instruction here
http://trac.osgeo.org/gdal/wiki/BuildingOnWindows to build gdal on Windows.

Now I have my installation under C:\ with this directory tree:

C:\
    GDAL-1.8.1
        bin
        lib
        data
        include
        html


I'm using Microsoft Visual C++ 2010, but with this small example, linking
fails:

#include <stdio.h>
#include <gdal.h>

int main() { GDALAllRegister(); return 0; }


------ Build started: Project: gdal_test, Configuration: Debug Win32 ------
  gdal_test.c
gdal_test.obj : error LNK2019: unresolved external symbol _GDALAllRegister at 0
referenced in function _main
C:\Documents and Settings\utente\documenti\visual studio
2010\Projects\gdal_test\Debug\gdal_test.exe : fatal error LNK1120: 1
unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


But I think to have set correctly include and lib paths into my project;  in
window Property Pages --> Configuration Properties --> VC++ Directories I
have set:

Executable Directories --> C:\GDAL-1.8.1\bin;$(ExecutablePath)
Include Directories --> C:\GDAL-1.8.1\include;$(IncludePath)
Library Directories --> C:\GDAL-1.8.1\lib;$(LibraryPath)


So, where am I wrong?


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GDAL-link-problem-on-MS-Visual-Express-2010-tp6824209p6830879.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list