Thanks very much Eric :)<br>I have read the instuctions, and <br><span style="color:rgb(11,83,148)">tar zxvf FileGDB_API_1_2-32.tar.gz</span> went well but I'm stuck on point 4 in the fist part of you instruction to make a sample to test the driver:<br>
~/Desktop/gdal-mod/FileGDB_API/samples$ make<br>It spot out a lot of thing complaining about 'undefiened reference to'... and it ends like:<br><span style="background-color:rgb(0,0,255)"><span style="background-color:rgb(243,243,243)"><span style="color:rgb(0,0,255)"><span style="color:rgb(11,83,148)">../../lib/libFileGDBAPI.so: undefined reference to `PathFileExistsW(wchar_t const*)'<br>
../../lib/libFileGDBAPI.so: undefined reference to `PathFindExtensionW(wchar_t const*)'<br>collect2: ld returned 1 exit status</span><br>make[1]: *** [../bin/Domains] Error 1<br>make[1]: Leaving directory `/home/a/Desktop/gdal-mod/FileGDB_API/samples/Domains'<br>
make: *** [Domains] Error 2</span></span><br><span style="background-color:rgb(243,243,243)"><span style="color:rgb(0,0,255)">Joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$ </span></span></span><br><span style><span style="background-color:rgb(243,243,243)"></span></span><br>
I tried to ignore the errors above, but when I move to <b>bin</b> it was empty and nothing happend:<br><span style="color:rgb(11,83,148)">~/Desktop/gdal-mod/FileGDB_API/samples/bin$ ./Querying<br>bash: ./Querying: No such file or directory</span><br>
I checked with ls -all and <b>bin</b> was empty.<br><br>Cheers and thanks<br>/Johan<br><br><div class="gmail_extra"><br><br><div class="gmail_quote">2012/11/14 Eric Goddard <span dir="ltr"><<a href="mailto:egoddard1010@gmail.com" target="_blank">egoddard1010@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">Below are the steps I use to add File Geodatabase support to gdal. This worked on Ubuntu 12.04 64-bit, but it doesn't use the deb source packages. Since you have a 32-bit ubuntu install, you need to download the 32-bit version of the FileGDB API. I tried to answer your questions as they come up in the steps I list below, so you may want to read through the whole thing before starting. Sorry for the length, but I hope it helps!</p>

<p dir="ltr">In terminal:</p><p dir="ltr">1. Change directory to wherever you downloaded the FileGDBAPI: <b>cd path/to/FileGDBAPI_download</b></p><p dir="ltr">2. extract the archive:<b> tar zxvf FileGDB_API_1_2-32.tar.gz</b> NOTE: Since you are using 32-bit Ubuntu, you need to download the 32-bit FileGDB API.</p>

<p dir="ltr">3.You need to build the samples to make sure the API works. Change to the FileGDB_API samples folder: <b>cd FileGDB_API/samples</b></p><p dir="ltr">4. type <b>make</b></p><p dir="ltr">5. Run a sample to make sure it works. Change directory to the bin folder inside samples: <b>cd bin </b>, and then type <b>./Querying</b>. You'll get a bunch of text in terminal, just make sure it doesn't spit out any errors.</p>

<p dir="ltr">6. If the sample runs successfully, you have a working FileGDB API and you are ready to compile GDAL. I like to move the FileGDB API to a better location than the downloads directory, but it is up to you. If you choose to move it, you can use the paths listed below. If you use your own location, change the path in the commands below to whatever you used. <b>sudo mv <your location>/FileGDB_API /usr/local/</b></p>


<p dir="ltr">7. Create a LD configuration file so that gdal is able to find the FGDB libraries: <b>sudo echo /usr/local/FileGDB_API/lib > etc/ld.so.conf.d/fgdb.conf </b></p><p dir="ltr">An explanation of ld is below.</p>

<p dir="ltr">8. run ldconfig to update the linked libraries: <b>sudo ldconfig</b></p><p dir="ltr">You're now ready to download and configure gdal.</p>
<p dir="ltr"><br>1. Download gdal from <a href="http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz" target="_blank">http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz</a><br>2. Extract the contents of the gdal archive: <b>tar zxvf gdal-1.9.2.tar.gz</b></p>

<p dir="ltr">3. Change to the gdal directory: <b>cd gdal-1.9.2</b></p><p dir="ltr">4. Now gdal needs to be configured. Your configure line may be different from the one below depending on the options you want included, but the important line to include is --with-fgdb=/usr/local/FileGDB_API. This is my configure line on my system: <b style="font-family:'Times New Roman'"><span style="font-weight:normal;font-size:15px;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc --with-libkml=yes --with-curl=yes --with-mrsid=/usr/local/MrSID_SDK/Raster_DSDK --with-mrsid_lidar=/usr/local/MrSID_SDK/Lidar_DSDK --with-openjpeg=/usr/include</span></b></p>

<p dir="ltr">The --with statements let the configuration script know what additional modules you want to be included in the compile. When you install packages, such as geos, from the repos the libraries are put in paths that ld (which is a utility that links libraries so that other applications are able to find them) knows about. When you compile by hand the general practice is to compile to /usr/local, which sometimes ld doesn't know about by default. You let ld know about additional paths by creating a configuration file in /etc/ld.so.conf.d/ that contains the path of your custom compiled libraries. </p>

<p dir="ltr">To compile GDAL with the options you want, your line might look something like this:</p><p dir="ltr"><b style="font-family:'Times New Roman'"><span style="font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc </span></b><br>

</p><p dir="ltr"><font color="#000000" face="Arial"><span style="white-space:pre-wrap">After configure runs, it will give you a summary that indicates what it was able to find. Check to make sure that there is a 'yes' beside the options you want. If there is a no beside something you want to include, you may need to scroll through the output and find the error to see what went wrong.</span></font></p>

<p dir="ltr"><br></p><p dir="ltr">5. Now you can run make and make install. <b>sudo make</b>. When that finishes, run <b>sudo make install</b>.</p>
<p dir="ltr">6. One more step: you need to let ld know about the gdal libraries. Since we didn't specify a different path, the configure line above puts them in /usr/local/lib by default. I let ld know about the libraries by adding a local.conf file to /etc/ld.so.conf.d/. <b>sudo echo /usr/local/lib > /etc/ld.so.conf.d/local.conf</b></p>

<p dir="ltr">7. Run ldconfig again: <b>sudo ldconfig</b></p><p dir="ltr"><b><br></b></p><p dir="ltr">You should be able to open geodatabases in QGIS or any other GIS application that uses GDAL now. I expanded on notes that I took while doing the install, but I didn't have my linux laptop with me while writing this. Let me know if anything doesn't work or if clarification is needed.</p>


<div class="gmail_quote"><div><div class="h5">On Nov 13, 2012 9:27 AM, "Johan Nilsson" <<a href="mailto:joni8135@gmail.com" target="_blank">joni8135@gmail.com</a>> wrote:<br type="attribution"></div></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5">




        
        
        
        


<p style="margin-bottom:0in;font-style:normal;font-weight:normal">
I have tried to find how I compile gdal 1.9.2 with ESRIs FileGDB_API, but I'm are very <span lang="en"><span>uncertain how it work.</span></span>
 I
have Ubuntu 10.04LTS 32-bit with PAE. I another step I downloaded source-code for gdal-1.9.2 and added needed packed with:</p><p style="margin-bottom:0in;font-style:normal;font-weight:normal"><b>cd ~/Desktop/gdal-mod</b> <span style="color:rgb(255,0,0)"><--move cursor to the created folder.</span><br>



<b>apt-get source gdal-bin </b><span style="color:rgb(255,0,0)"><--download
 source-cod from my respositories (same as my binary installed on my 
system, into the folder I stand in ~/Desktop/gdal-mod)</span><br>


<b>sudo apt-get build-dep gdal</b> <span style="color:rgb(255,0,0)"><--geting dependencies so my system can build the package gdal.</span></p><p style="margin-bottom:0in;font-style:normal;font-weight:normal"><br></p>
<p style="margin-bottom:0in">
</p>
<p style="margin-bottom:0in;font-weight:normal"><font color="#000000">From
<a href="https://github.com/usgin/ncgmp/wiki/Installation-Example" target="_blank">https://github.com/usgin/ncgmp/wiki/Installation-Example</a> I found
this example</font></p>
<p style="margin-bottom:0in"><font color="#666666"><b>
</b></font></p>
<ol><li><p style="margin-bottom:0in"><font color="#666666"><i><b>cd
        ~/downloads </b></i><font><span style="color:rgb(255,0,0)"><--change to the folder with the downloaded driver from ESRI</span></font><i><b><br></b></i></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>tar
        xzf FileGDB_API_1_2-64.tar.gz </b></i><span style="color:rgb(255,0,0)"><--unpacking</span></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>cd
        ~/downloads/FileGDB_API/lib </b></i><span style="color:rgb(255,0,0)"><--goes to a file in the unpacked FileGDB</span><i><b><br></b></i></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>ln
        -s libfgdbunixrtl.so libfgdblinuxrtl.so
 </b><font color="#ff0000"><span style="font-weight:normal"><--made
        a symbolic link in the folder lib because ESRI change the name.</span></font></i></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>cd
        ../..</b></i><span style="color:rgb(204,0,0)"><span> <--up 2 levels</span></span><i><b><span style="color:rgb(204,0,0)"><span><span></span></span></span><br>
</b></i></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>tar
        xvf gdal-1.9.0.tar.gz </b></i><span style="color:rgb(255,0,0)"><--unpacking, I have a newer file</span><i><b><br></b></i></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>cd
        gdal-1.9.0
</b></i></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>./configure
        --with-pg=/usr/bin/pg_config
        --with-fgdb=/home/ubuntu/downloads/FileGDB_API
        --with-geos=/usr/local/bin/geos-config
        --with-static-proj4=/usr/local/lib/libproj.a --with-python
</b></i></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>make
</b></i></font></p>
        </li><li><p style="margin-bottom:0in"><font color="#666666"><i><b>sudo
        make install</b></i></font></p>
</li></ol>

<p style="margin-bottom:0in;font-style:normal;font-weight:normal"><font color="#000000">First
a question! If I make a 'make install', and if it don't work, how can i
change back to my original gdal-bin?</font></p><p style="margin-bottom:0in;font-style:normal;font-weight:normal"><font color="#000000">Second. Does this install libFileGDBAPI.so (Read a tut<font>o</font>rial, there th<font>e</font>y said that </font><font color="#000000">libFileGDBAPI.so should be install in it default directory, which I <font>don't know where it is...</font><br>




</font></p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in;font-style:normal;font-weight:normal">
<font color="#000000">6. I have a newer version of gdal (1.9.2)
and I have the 32-bit version on this machine. The swift '--with' in
this example above are not so accurate for my system, I think? What does '--with' really do? Does it create links in gdal or does it more?<br></font></p>

<p style="margin-bottom:0in">
<font color="#000000"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">Does
someone know w</span></span></span></font><font color="#000000"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">h</span></span></span></font><font color="#000000"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">ich
</span></span></span></font><font color="#000000"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">swift
'--with ' </span></span></span></font><font color="#000000"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">I
s</span></span></span></font><font color="#000000"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">h</span></span></span></font><font color="#000000"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">ould
have or are </span></span></span></font><span lang="en">necessary</span><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">
or good to have? Do the FileGDB also get compiled at the same time?</span></span></span></span></font>
</p>

<p style="margin-bottom:0in"><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">I
seach my system and change </span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">the
path </span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">in
the example: first </span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">where</span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">
I have my FileGDB_API and </span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">then
</span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">some
</span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">other
</span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">files
have also a different path? Do I need all this --with, or does a
default file add </span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">it?</span></span></span></span></font></p>




<p style="margin-bottom:0in"><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">My modified '--with', if it's needed?<br>



</span></span></span></span></font></p>



<p style="margin-bottom:0in"><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">./configure
</span></span></span></span></font><font color="#ff0000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">--with-pg=/usr/bin/pg_config</span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">
</span></span></span></span></font><font color="#008000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">--with-fgdb=/home/Joni/Desktop/gdal-mod/FileGDB_API</span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">
</span></span></span></span></font><font color="#2300dc"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">--with-geos=/usr/bin/geos-config</span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">
</span></span></span></span></font><font color="#663300"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">--with-static-proj4=/usr/lib/libproj.a</span></span></span></span></font><font color="#000000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">
</span></span></span></span></font><font color="#ff0000"><span lang="en"><span style="font-style:normal"><span style="text-decoration:initial"><span style="font-weight:normal">--with-python</span></span></span></span></font></p>







<p style="margin-bottom:0in;font-style:normal;font-weight:normal"><font color="#000000"><span lang="en"><span style="text-decoration:initial">If I don't add anything more than, my FilGDB_API, there the source-code are, does there are any 'Default setting', so It work as now? I
had a Postgis config-file as in the example</span></span><font color="#008000"><span lang="en"><span style="text-decoration:initial"><font color="#000000">.</font> </span></span></font><span lang="en"><span style="text-decoration:initial">In </span></span><span lang="en"><span style="text-decoration:initial">this
example they had compiled a geos package, but my system did have
libgeos and a geos-config file in above blue directory.</span></span><span lang="en"><span style="text-decoration:initial">
The '</span></span><font color="#666666"><span lang="en"><i><span style="text-decoration:initial"><b>--with-static-proj4=<u>/usr/</u><u>local/lib/libproj.a</u></b></span></i></span></font><u><font color="#666666"><span lang="en"><i><span style="text-decoration:initial"><b>'
</b></span></i></span></font></u><span lang="en"><span style="text-decoration:initial">have
I changed to another <u>path</u>, there I find a</span></span><font color="#666666"><span lang="en"><i><span style="text-decoration:initial"><b>
</b></span></i></span></font><font color="#804c19"><span lang="en"><i><span style="text-decoration:initial"><b>libproj.a</b></span></i></span></font><font color="#666666"><span lang="en"><i><span style="text-decoration:initial"><b>
</b></span></i><span><span style="text-decoration:initial">file.</span></span></span></font></font></p><p style="margin-bottom:0in;font-style:normal;font-weight:normal">Hope someone can explain little..</p>
<p style="margin-bottom:0in;font-style:normal;font-weight:normal">/Cheers <br></p><p style="margin-bottom:0in;font-style:normal;font-weight:normal">Johan<br><font color="#000000"><font color="#666666"><span lang="en"><span><span style="text-decoration:initial"></span></span></span></font></font></p>




<p style="margin-bottom:0in;font-style:normal;font-weight:normal"><font color="#000000"><font color="#666666"><span lang="en"><span><span style="text-decoration:initial"><br></span></span></span></font></font></p>


<br></div></div>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br></blockquote></div>
</blockquote></div><br></div>