Hi again,<br>a side note:<br>in the subject of your email, you are asking for &quot;supporting ECW as a plugin&quot; whilst in the body of your email you are generally asking for supporting ECW in GDAL.<br>The steps I have suggested in the previous email, are needed only if you need to add ECW support as a separate plugin.<br>
In case your aim is simply adding ECW in GDAL (without leveraging on the &quot;Plugin way&quot;) you can simply rebuild GDAL after having removed the &quot;ECW_PLUGIN = YES&quot; line from NMAKE.opt. <br><br>Hope this help.<br>
Regards,<br>Daniele<br><br><div class="gmail_quote">On Fri, Dec 19, 2008 at 5:59 PM, Daniele Romagnoli <span dir="ltr">&lt;<a href="mailto:dany.geotools@gmail.com">dany.geotools@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, <br>I did a similar thing on 1.4.4 and 1.5.3.<br>Basically, you are building ECW driver as a plugin as stated by the flag ECW_PLUGIN = YES<br>Therefore, you need to do a separate build of the ECW GDAL Driver. <br>Go in gdal/frmts/ecw and run &quot;nmake /f <a href="http://makefile.vc" target="_blank">makefile.vc</a> plugin&quot;<br>

This command should produce a gdal_ECW_JP2ECW.DLL.<br><br>Finally you need to define a GDAL_DRIVER_PATH environment variable linking to the location where you have built gdal_ECW_JP2ECW.DLL.<br>After this, gdalinfo should find the ECW driver.<br>

<br>Let me know if you have additional issues, since I did these steps on 1.4.4 which needed some fixes that I have copied from 1.6.0 code. (I guess 1.6.0 already contains all the proper declarations)<br><br>Regards,<br>
Daniele<div><div></div><div class="Wj3C7c"><br>
<br><br><div class="gmail_quote">On Mon, Dec 15, 2008 at 3:21 AM, wickley <span dir="ltr">&lt;<a href="mailto:wickleyl@gmail.com" target="_blank">wickleyl@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
Hello , I &nbsp;have some question about supporting ECW in gdal.but I can not<br>
solve &nbsp;it. My step is following:<br>
<br>
1.I download gdal-1.6.0 and<br>
ImageCompressionSDKSourceCode3.3Setup_20070509.zip from ERMaper webset and<br>
Windows Server 2003 R2 Platform SDK from microsoft website.<br>
2. I set up Windows Server 2003 R2 Platform SDK on my computer in D:\Program<br>
Files2.<br>
3. I unzip the ImageCompressionSDKSourceCode3.3Setup_20070509.zip,and select<br>
E:\libecwj2-3.3<br>
 &nbsp; \Source\NCSBuildQmake\libecwj2_win32_net_shared.vcproj,using visual<br>
studio 2005.When open the file,<br>
 &nbsp; it needs translate, and it translates well with no error and just two<br>
warnings.<br>
4. I set visual studio 2005 project-&gt;c/c++-&gt;general -&gt;include directory,and<br>
add D:\Program Files2\Microsoft Platform SDK for &nbsp;Windows Server 2003<br>
R2\Include<br>
5. I select debug,win32 ,and build libecwj2.dll successfully,and it is<br>
included in E:\libecwj2-3.3\Source\NCSBuildQmake\Debug<br>
6. I unzip gdal-1.6.0 to E:\gdal-1.6.0. change MSVC_VER=1400 .<br>
7. for ECW support, I Uncomment the following and update to enable ECW<br>
support.<br>
 &nbsp; &nbsp;# Uncomment the following and update to enable ECW support.<br>
 &nbsp; &nbsp;ECW_PLUGIN = YES<br>
 &nbsp; &nbsp;ECWDIR &nbsp;= &nbsp; E:\libecwj2-3.3<br>
 &nbsp; &nbsp;ECWLIB &nbsp;= &nbsp; $(ECWDIR)\Source\NCSBuildQmake\Debug\libecwj2.lib<br>
8. &nbsp; open E:\gdal-1.6.0\frmts\leveller\levellerdataset.cpp,and change { &quot;?,<br>
kPI / 180.0, UNITLABEL_DEGREE } to<br>
 &nbsp; { &quot;?&quot;, kPI / 180.0, UNITLABEL_DEGREE }<br>
9. I start visual studio 2005 commandline , and change the path to<br>
E:\gdal-1.6.0, then ,I inputs command nmake /f <a href="http://makefile.vc" target="_blank">makefile.vc</a>,nmake /f<br>
<a href="http://makefile.vc" target="_blank">makefile.vc</a> install and nmake /f <a href="http://makefile.vc" target="_blank">makefile.vc</a> devinstall.<br>
10. I copy gdal16.dll to C:\WINDOWS\system32.<br>
11. I set tools-&gt;options-&gt;projec and solution -&gt; vc++ direction<br>
-&gt;includingfile-&gt;C:\warmerda\bld\include<br>
<br>
-&gt;libraries-&gt;C:\warmerda\bld\lib<br>
12.I build a new project,and code following:<br>
 &nbsp; #include &quot;gdal_priv.h&quot;<br>
 &nbsp; #include &quot;stdio.h&quot;<br>
 &nbsp; #include &quot;gdal.h&quot;<br>
 &nbsp; #pragma comment(lib, &quot;gdal_i.lib&quot;)<br>
 &nbsp; int main()<br>
 &nbsp; {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;const char *p=NULL;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;GDALDataset &nbsp;*poDataset=NULL;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;GDALDriver *pDriver=NULL;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;GDALAllRegister();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;int t =GDALGetDriverCount();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;printf(&quot;%d\n&quot;,t);<br>
 &nbsp; &nbsp; &nbsp; &nbsp;for(int k=0;k&lt;t;k++)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const char *pt=NULL;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pDriver=(GDALDriver *)GDALGetDriver(k);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pt=pDriver-&gt;GetDescription();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printf(&quot;%s\n&quot;,pt);<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp;}<br>
result:<br>
75<br>
VRT<br>
GTiff<br>
NITF<br>
RPFTOC<br>
HFA<br>
SAR_CEOS<br>
CEOS<br>
JAXAPALSAR<br>
GFF<br>
ELAS<br>
AIG<br>
AAIGrid<br>
SDTS<br>
DTED<br>
PNG<br>
JPEG<br>
MEM<br>
JDEM<br>
GIF<br>
ESAT<br>
BSB<br>
XPM<br>
BMP<br>
DIMAP<br>
AirSAR<br>
RS2<br>
PCIDSK<br>
PCRaster<br>
ILWIS<br>
SGI<br>
SRTMHGT<br>
Leveller<br>
Terragen<br>
ISIS3<br>
ISIS2<br>
PDS<br>
ERS<br>
L1B<br>
FIT<br>
GRIB<br>
RMF<br>
MSGN<br>
RST<br>
INGR<br>
GSAG<br>
GSBG<br>
GS7BG<br>
COSAR<br>
TSX<br>
COASP<br>
PNM<br>
DOQ1<br>
DOQ2<br>
ENVI<br>
EHdr<br>
GenBin<br>
PAux<br>
MFF<br>
MFF2<br>
FujiBAS<br>
GSC<br>
FAST<br>
BT<br>
LAN<br>
CPG<br>
IDA<br>
NDF<br>
EIR<br>
DIPEx<br>
LCP<br>
RIK<br>
USGSDEM<br>
GXF<br>
ADRG<br>
BLX<br>
<br>
there is no ECW,why?can anyone help me?<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Supporting-ECW-as-a-plugin-on-window%2C-tp20997632p20997632.html" target="_blank">http://www.nabble.com/Supporting-ECW-as-a-plugin-on-window%2C-tp20997632p20997632.html</a><br>


Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br>-------------------------------------------------------<br>Eng. Daniele Romagnoli <br>Software Engineer<br><br>GeoSolutions S.A.S.<br>Via Carignoni 51<br>
55041 Camaiore (LU)<br>
Italy<br><br>phone: +39 0584983027<br>fax: &nbsp; &nbsp; +39 0584983027<br>mob: &nbsp; +39 328 0559267<br><br><br><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a><br><br>-------------------------------------------------------<br>

<br>
</blockquote></div><br><br clear="all"><br>-- <br>-------------------------------------------------------<br>Eng. Daniele Romagnoli <br>Software Engineer<br><br>GeoSolutions S.A.S.<br>Via Carignoni 51<br>55041 Camaiore (LU)<br>
Italy<br><br>phone: +39 0584983027<br>fax: &nbsp; &nbsp; +39 0584983027<br>mob: &nbsp; +39 328 0559267<br><br><br><a href="http://www.geo-solutions.it">http://www.geo-solutions.it</a><br><br>-------------------------------------------------------<br>
<br>