[FWTools] Re: [Gdal-dev] Need Help compiling OGR sample in linux

Frank Warmerdam warmerdam at pobox.com
Thu Nov 8 10:07:33 EST 2007


vdharan nadra wrote:
> Hi,
> 
> Can any one please  provide me the step by step procedure to compile
> the following sample in linux.
> I have installed fwtools. Iam new to linux environment.

Hi,

I was able to build this program using the command:

  g++ -I/usr3/pkg4/OpenEV_FW_Tree/FWTools/include 
-L/usr3/pkg4/OpenEV_FW_Tree/FWTools/lib test1.cpp -lgdal -o test1

Because you are using C++, there are fairly compiler version specific
linkage issues and you will need to use a version of g++ compatible with
g++ 3.2.3. And 3.2.x would be fine.  4.x likely not.

If you were to rework your program to use the equivelent C API this
problem would not exist.

I also found I had to source the fwtools_env.sh script first in order
to set LD_LIBRARY_PATH properly so that dependent libraries were found.

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    | President OSGeo, http://osgeo.org



More information about the FWTools mailing list