| 158 | == Windows Builds == |
| 159 | |
| 160 | Kakadu (6.2.1 at least) comes with solution files for VS2005 and VS2008. I used Visual Studio Express 2008 successfully to build the solution in the coresys and apps directories but I first had to modify the coresys.rc file to avoid a dependency on afxres.h. I did this, similar to the gdal .rc file: |
| 161 | |
| 162 | {{{ |
| 163 | // Generated from the TEXTINCLUDE 2 resource. |
| 164 | // |
| 165 | //#include "afxres.h" |
| 166 | |
| 167 | #define APSTUDIO_HIDDEN_SYMBOLS |
| 168 | #include <windows.h> |
| 169 | #undef APSTUDIO_HIDDEN_SYMBOLS |
| 170 | #include <winver.h> |
| 171 | }}} |
| 172 | |
| 173 | In GDAL/OGR trunk (1.7dev) I have substantially updated the makefile.vc and nmake.opt entries for Kakadu support. Now it should be sufficient to update the nmake.opt entries appropriately for your local tree: |
| 174 | |
| 175 | {{{ |
| 176 | # Uncommment if you have Kakadu 6.0 or newer |
| 177 | KAKDIR = \warmerda\pkg\kakadu-6.2.1 |
| 178 | KAKLIB = $(KAKDIR)\lib_x86\kdu_v62R.lib |
| 179 | KAKSRC = $(KAKDIR)\v6_2_1-00256N |
| 180 | }}} |
| 181 | |
| 182 | This assumes that the source was unpacked inside $(KAKDIR) and that the normal solutions were used to build stuff - they put the resulting object code, dlls and executables a directory above the source tree. Under some circumstances it may be necessary to change some definitions in gdal/frmts/jp2kak/makefile.vc such as: |
| 183 | |
| 184 | {{{ |
| 185 | OBJ_PREFIX = $(KAKDIR)\v6_generated_x86 |
| 186 | OBJ_CONFIG = release |
| 187 | }}} |
| 188 | |
| 189 | or |
| 190 | |
| 191 | {{{ |
| 192 | EXTRAFLAGS = $(KAKINC) /DKDU_PENTIUM_MSVC /EHsc |
| 193 | }}} |
| 194 | |
| 195 | Do not forget to copy the DLL from the $(KAKDIR)\bin_x86 directory or to add it to the path. |
| 196 | |
| 197 | Note that GDAL/OGR 1.6.x and earlier use another makefile structure based on the assumption that the Kakadu stuff is being built in a idiosyncratic manner. It may be best to copy the [http://svn.osgeo.org/gdal/trunk/gdal/frmts/jp2kak/makefile.vc trunk makefile.vc] into gdal/frmts/jp2kak and add the above definitions normally found in nmake.opt in it directly. |
| 198 | |