<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:1522667408;
        mso-list-type:hybrid;
        mso-list-template-ids:-152126418 68485135 68485145 68485147 68485135 68485145 68485147 68485135 68485145 68485147;}
@list l0:level1
        {mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=PL link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Finally I managed to solve a problem with binding
GDAL C API in <st1:place w:st="on">Delphi</st1:place>. I attach a DEF file that
must be used as a link option to make C API visible under <st1:place w:st="on">Delphi</st1:place>.
To build a <st1:place w:st="on">Delphi</st1:place> friendly GDAL DLL file,
please:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<ol style='margin-top:0cm' start=1 type=1>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>in nmake.opt file
add param :<o:p></o:p></span></font></li>
</ol>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'> LINKER_FLAGS_GDAL =
/def: gdal14.def<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<ol style='margin-top:0cm' start=2 type=1>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>in makefile.vc
change :<o:p></o:p></span></font></li>
</ol>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>$(GDAL_DLL): staticlib<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'> link /dll /debug
$(OGR_INCLUDE) $(BASE_INCLUDE) $(LIBOBJ) \<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'> $(EXTERNAL_LIBS)
gcore\Version.res \<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'> /out:$(GDAL_DLL)
/implib:gdal_i.lib $(LINKER_FLAGS_GDAL)<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>I changed linker flag
name in point 1, because LINKER_FLAGS is used in GDAL and OGR. If I leave this flag
name unchanged, OGR won’t link properly looking for GDAL functions. Maybe
the solution for this is to make two separate def files for GDAL and OGR. My
trick works as a temporary solution.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>After successful compilation
I can bind all GDAL and OGR functions in <st1:place w:st="on">Delphi</st1:place>.
I tested almost all GDAL functions with different raster formats.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>I hope that dev team will
make use of this and import it gracefully into GDAL sources for further tests.<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial'>Ps. Thanks for Ivan for
clues. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>Pozdrowienia / Regards<br>
Artur Red¼ko<br>
<br>
</span></font><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'> </span></font><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>