svn-gvsig-desktop / tags / v1_9_Build_1231 / libraries / libjni-readecw-linux / doc / link_Libs_Info.txt @ 32257
History | View | Annotate | Download (3.45 KB)
1 | 2271 | igbrotru | -------------------------------- |
---|---|---|---|
2 | ECW SOURCE COMPILATION IN LINUX |
||
3 | -------------------------------- |
||
4 | |||
5 | 2274 | igbrotru | You have download ecw sdk source from http://www.ermapper.com |
6 | You have modify the makefile.inc file in the NCSNighttlyBuild directory |
||
7 | 2271 | igbrotru | GCC_LIB_PATH = write your gcc path |
8 | 2274 | igbrotru | NCSTOP = Path to the source |
9 | 2271 | igbrotru | |
10 | Compiling reading libraries |
||
11 | Go to NCSCnet3 directory and do make |
||
12 | Go to NCSEcw directory and do make |
||
13 | Go to NCSUtil directory and do make |
||
14 | |||
15 | COMPILING JECW |
||
16 | |||
17 | Go to NCSEcw directory and edit makefile |
||
18 | You must add this lines to the end of makefile |
||
19 | |||
20 | jecw: ecw_jni.o |
||
21 | $(CXX) -g -shared -Wl,-soname,libjecw.so -o libjecw.so.0.0.0 ecw_jni.o -lc -Wall -lNCSEcw -lNCScnet -lNCSUtil -L../../../../bin/linux/ |
||
22 | mv ./libjecw.so.0.0.0 $(NCS_LIB_PATH) |
||
23 | |||
24 | ecw_jni.o: |
||
25 | $(CXX) -c ./ecw_jni.c $(CFLAGS) |
||
26 | |||
27 | Execute make jecw |
||
28 | |||
29 | COMPILING COMPRESSOR |
||
30 | |||
31 | 2274 | igbrotru | You'll have to create the makefile to compile the compressor inside the NCSEcw/shared_src directory and put there your host specific includes |
32 | 2271 | igbrotru | |
33 | 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 |
||
34 | 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 |
||
35 | LIBS = -lm -lc -lrt -ldl -lstdc++ -lsupc++ -lgcc_s -lNCSCNet -lNCSEcw -lNCSUtil |
||
36 | |||
37 | all: |
||
38 | gcc -O3 -c compress.cpp -Wall -Wno-long-long -fpic -DLINUX -DPOSIX $(INCLUDE) -D UNICODE -D ECW_COMPRESS -w |
||
39 | 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 |
||
40 | |||
41 | install: |
||
42 | cp ../../../../bin/linux/libNCSEcwC.so /lib |
||
43 | |||
44 | clean: |
||
45 | rm compress.o |
||
46 | rm ../../../../bin/linux/libNCSEcwC.so |
||
47 | |||
48 | |||
49 | ---------------------------------- |
||
50 | ECW SOURCE COMPILATION IN WINDOWS |
||
51 | ---------------------------------- |
||
52 | |||
53 | 2274 | igbrotru | Ermapper includes support for the dll's compilation. |
54 | There are some projects within the source files for Visual C for compile and link the libraries that come with the sdk |
||
55 | You must create a makefile.w32 file inside the NCSEcw directory in order to generate jecw.dll with this content: |
||
56 | 2271 | igbrotru | |
57 | 2274 | igbrotru | |
58 | 2271 | igbrotru | #***************************************** |
59 | |||
60 | 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" |
||
61 | DSTNO_LIB = "C:\windows\system32" |
||
62 | LIB_EXTERNAS = ../../../../bin/NCSUtil.lib ../../../../bin/NCSEcw.lib ../../../../bin/NCSEcwC.lib |
||
63 | |||
64 | 2272 | igbrotru | #Compilers and programs |
65 | 2271 | igbrotru | |
66 | CC = cl.exe |
||
67 | LINK = link.exe |
||
68 | |||
69 | OBJS = ecw_jni.obj |
||
70 | NOM_LIB = jecw |
||
71 | LIB = $(NOM_LIB).dll |
||
72 | |||
73 | 2272 | igbrotru | #Directories |
74 | 2271 | igbrotru | |
75 | 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" |
||
76 | DEST_OBJS = ./bin |
||
77 | DISTRIBUCION = ./dist |
||
78 | |||
79 | 2272 | igbrotru | #Files |
80 | 2271 | igbrotru | |
81 | FTE_HEADER_ECW = $(PAQUETE_ECW).JNCSFile |
||
82 | |||
83 | #Opciones |
||
84 | |||
85 | FLAGS = -c -W3 -G4 -D_X86_=1 -DDLL -DWIN32 -GX -MD -Zi -Od |
||
86 | 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) |
||
87 | OPC_LINK = /nologo /dll /machine:I386 /incremental:yes /pdb:"$(NOM_LIB).pdb" /debug /out:"$(NOM_LIB).dll" /implib:"$(NOM_LIB).lib" |
||
88 | VERS = 0.0.0 |
||
89 | |||
90 | default: $(OBJS) $(LIB) |
||
91 | |||
92 | ecw_jni.obj: |
||
93 | $(CC) $(FLAGS) -I$(INCLUDE) ./src/ecw_jni.c |
||
94 | |||
95 | $(LIB): |
||
96 | link $(STAT_LIB) $(OPC_LINK) $(LIBR) $(OBJS) |
||
97 | |||
98 | #***************************************** |
||
99 | |||
100 | 2274 | igbrotru | Check that the paths of the includes match with our Visual C |
101 | 2271 | igbrotru | |
102 | Execute this command inside NCSEcw directory: |
||
103 | nmake /f makefile.w32 |