-------------------------------- ECW SOURCE COMPILATION IN LINUX -------------------------------- You have download ecw sdk source from http://www.ermapper.com You have modify the makefile.inc file in the NCSNighttlyBuild directory GCC_LIB_PATH = write your gcc path NCSTOP = Path to the source Compiling reading libraries Go to NCSCnet3 directory and do make Go to NCSEcw directory and do make Go to NCSUtil directory and do make COMPILING JECW Go to NCSEcw directory and edit makefile You must add this lines to the end of makefile jecw: ecw_jni.o $(CXX) -g -shared -Wl,-soname,libjecw.so -o libjecw.so.0.0.0 ecw_jni.o -lc -Wall -lNCSEcw -lNCScnet -lNCSUtil -L../../../../bin/linux/ mv ./libjecw.so.0.0.0 $(NCS_LIB_PATH) ecw_jni.o: $(CXX) -c ./ecw_jni.c $(CFLAGS) Execute make jecw COMPILING COMPRESSOR You'll have to create the makefile to compile the compressor inside the NCSEcw/shared_src directory and put there your host specific includes INCLUDE = -I../../../include -I/usr/local/include/g++-v3 -I/usr/local/j2sdk1.4.2_03/include/ -I/usr/local/j2sdk1.4.2_03/include/linux -I../lcms/include DIR_LIBS = -L/usr/lib/gcc-lib/i486-linux/3.3.5 -L/usr/lib -L/usr/local/lib -L/home/flus/gdal/SourceC_ecw/bin/linux LIBS = -lm -lc -lrt -ldl -lstdc++ -lsupc++ -lgcc_s -lNCSCNet -lNCSEcw -lNCSUtil all: gcc -O3 -c compress.cpp -Wall -Wno-long-long -fpic -DLINUX -DPOSIX $(INCLUDE) -D UNICODE -D ECW_COMPRESS -w gcc -shared -s -z defs $(DIR_LIBS) compress.o /usr/lib/gcc-lib/i586-suse-linux/3.3.1/libgcc.a $(LIBS) -o ../../../../bin/linux/libNCSEcwC.so install: cp ../../../../bin/linux/libNCSEcwC.so /lib clean: rm compress.o rm ../../../../bin/linux/libNCSEcwC.so ---------------------------------- ECW SOURCE COMPILATION IN WINDOWS ---------------------------------- Ermapper includes support for the dll's compilation. There are some projects within the source files for Visual C for compile and link the libraries that come with the sdk You must create a makefile.w32 file inside the NCSEcw directory in order to generate jecw.dll with this content: #***************************************** LIBR = /LIBPATH:"C:\Archivos de programa\Microsoft Visual Studio .NET 2003\Vc7\lib" /LIBPATH:"C:\Archivos de programa\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib" DSTNO_LIB = "C:\windows\system32" LIB_EXTERNAS = ../../../../bin/NCSUtil.lib ../../../../bin/NCSEcw.lib ../../../../bin/NCSEcwC.lib #Compilers and programs CC = cl.exe LINK = link.exe OBJS = ecw_jni.obj NOM_LIB = jecw LIB = $(NOM_LIB).dll #Directories INCLUDE = -I./include -I"C:\Archivos de programa\Microsoft Visual Studio .NET 2003\Vc7\include" -I"C:\Archivos de programa\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include" DEST_OBJS = ./bin DISTRIBUCION = ./dist #Files FTE_HEADER_ECW = $(PAQUETE_ECW).JNCSFile #Opciones FLAGS = -c -W3 -G4 -D_X86_=1 -DDLL -DWIN32 -GX -MD -Zi -Od STAT_LIB = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib $(LIB_EXTERNAS) OPC_LINK = /nologo /dll /machine:I386 /incremental:yes /pdb:"$(NOM_LIB).pdb" /debug /out:"$(NOM_LIB).dll" /implib:"$(NOM_LIB).lib" VERS = 0.0.0 default: $(OBJS) $(LIB) ecw_jni.obj: $(CC) $(FLAGS) -I$(INCLUDE) ./src/ecw_jni.c $(LIB): link $(STAT_LIB) $(OPC_LINK) $(LIBR) $(OBJS) #***************************************** Check that the paths of the includes match with our Visual C Execute this command inside NCSEcw directory: nmake /f makefile.w32