10 | | == Building libecwj library on Unix == |
11 | | |
12 | | In order to use GDAL with ECW support under Linux, Solaris or Mac OS systems, you will need to build the '''libecwj''' library on your own, so it's required to download '''Image Compression SDK Source Code''' but not the binary distribution which is dedicated for Windows family systems. Current version is ECW SDK 3.3 and the source code package is named '''libecwj2-3.3-2006-09-06.zip'''. |
13 | | |
14 | | The source code is equipped with '''configure''' and Makefile.in scripts. There is also an utility script called '''bootstrap''' that can be used to regenerate the '''configure''' and Makefile.in files, if you have installed required tools: autoconf, automake, m4, libtool. |
15 | | |
16 | | In the former case, the procedure is simple: |
17 | | |
18 | | {{{ |
19 | | $ cd /path/to/libecwj2-3.3 |
20 | | $ ./configure |
21 | | $ make |
22 | | # make install |
23 | | }}} |
24 | | |
25 | | where the last step should be run as superuser. |
26 | | |
27 | | By default, the '''libecwj''' is installed using installation prefix pointing to '''/usr/local'''. You can change this location with '''--prefix''' option of '''configure''' script. Run ''./configure --help'' for more details. |
28 | | |
29 | | === Mac OS X notes === |
30 | | |
31 | | There are a few problems possible with libecwj2-3.3 on Mac OS X. For more details, refer to Ticket #2032 - ''Building with ECW support on Mac OS X'' |
32 | | |
| 9 | If the out of date libecwj 3.3 SDK can be found, it can also be used. It has significantly different licensing details. Some tickets and discussion below are related to the 3.3 SDK. |
| 10 | |
57 | | ''TO BE DONE'' |
| 35 | In the nmake.opt are the following instructions for building with read support with the 4.1 or newer readonly SDK. |
| 36 | |
| 37 | {{{ |
| 38 | # Uncomment the following and update to enable ECW read support with the |
| 39 | # 4.1+ readonly SDK |
| 40 | #ECWDIR = "c:/Program Files/ERDAS/ERDAS ECW JPEG2000 Read SDK" |
| 41 | #ECWFLAGS = -DECWSDK_VERSION=41 \ |
| 42 | # -I$(ECWDIR)\include \ |
| 43 | # -I$(ECWDIR)\include/ecw/api -I$(ECWDIR)\include/ecw/jp2 \ |
| 44 | # -I$(ECWDIR)\include/ecw/ecw |
| 45 | #ECWLIB = $(ECWDIR)\lib\vc90\win32\NCSEcw4_RO.lib \ |
| 46 | # $(ECWDIR)\lib\vc90\win32\NCSUtil4.lib \ |
| 47 | # $(ECWDIR)\lib\vc90\win32\NCScnet4.lib |
| 48 | }}} |
| 49 | |
| 50 | Once built, you will need to copy the appropriate redistributable ECW DLLs into the path. For the above case with VC9 this might be accomplished something like: |
| 51 | |
| 52 | {{{ |
| 53 | copy "C:\Program Files\ERDAS\ERDAS ECW JPEG2000 Read SDK\redistributable\vc90\win32\*.dll" C:\windows\system32 |
| 54 | }}} |
| 55 | |
| 56 | The above builds ECW support into the core GDAL DLL. In order to build the ECW and JP2ECW drivers as plugins uncomment the plugin line in the nmake.opt: |
| 57 | # To build ECW support as a plugin uncomment the following, and make sure |
| 58 | # to do "nmake /f makefile.vc plugin" in gdal/frmts/ecw and copy the two |
| 59 | # resulting DLLs to an appropriate place. |
| 60 | {{{ |
| 61 | ECW_PLUGIN = YES |
| 62 | }}} |
| 63 | |
| 64 | Then do the following in gdal/frmts/ecw (after the GDAL build) to create the plugins: |
| 65 | |
| 66 | {{{ |
| 67 | nmake /f makefile.vc plugin |
| 68 | }}} |
| 69 | |
| 70 | Then copy the resulting DLLs in that directory somewhere appropriate for GDAL plugins, like into a "gdalplugins" directory under the directory where the .exes live or into a directory pointed to by the GDAL_DRIVER_PATH configuration option (or environment variable). |
| 71 | |
| 72 | == Building libecwj 3.3 library on Unix == |
| 73 | |
| 74 | In order to use GDAL with ECW support under Linux, Solaris or Mac OS systems, you will need to build the '''libecwj''' library on your own, so it's required to download '''Image Compression SDK Source Code''' but not the binary distribution which is dedicated for Windows family systems. Current version is ECW SDK 3.3 and the source code package is named '''libecwj2-3.3-2006-09-06.zip'''. |
| 75 | |
| 76 | The source code is equipped with '''configure''' and Makefile.in scripts. There is also an utility script called '''bootstrap''' that can be used to regenerate the '''configure''' and Makefile.in files, if you have installed required tools: autoconf, automake, m4, libtool. |
| 77 | |
| 78 | In the former case, the procedure is simple: |
| 79 | |
| 80 | {{{ |
| 81 | $ cd /path/to/libecwj2-3.3 |
| 82 | $ ./configure |
| 83 | $ make |
| 84 | # make install |
| 85 | }}} |
| 86 | |
| 87 | where the last step should be run as superuser. |
| 88 | |
| 89 | By default, the '''libecwj''' is installed using installation prefix pointing to '''/usr/local'''. You can change this location with '''--prefix''' option of '''configure''' script. Run ''./configure --help'' for more details. |
| 90 | |
| 91 | === Mac OS X notes === |
| 92 | |
| 93 | There are a few problems possible with libecwj2-3.3 on Mac OS X. For more details, refer to Ticket #2032 - ''Building with ECW support on Mac OS X'' |