root / trunk / libraries / libjni-readecw-linux / doc / enlazar_Libs_Info.txt @ 6869
History | View | Annotate | Download (3.41 KB)
1 |
-------------------------------- |
---|---|
2 |
COMPILAR FUENTES DE ECW EN LINUX |
3 |
-------------------------------- |
4 |
|
5 |
Debes bajar las fuentes del sdk de Ecw de Ermapper de http://www.ermapper.com |
6 |
Cambiar el makefile.inc del directorio NCSNighttlyBuild |
7 |
GCC_LIB_PATH = tu path de librerias gcc |
8 |
NCSTOP = Ruta de los fuentes |
9 |
Compilar librerias de lectura |
10 |
Ir al directorio NCSCnet3 y hacer make |
11 |
Ir al directorio NCSEcw y hacer make |
12 |
Ir al directorio NCSUtil y hacer make |
13 |
|
14 |
COMPILAR JECW |
15 |
|
16 |
Ir al directorio NCSEcw y editar el makefile |
17 |
A?adirle las l?neas al final |
18 |
|
19 |
jecw: ecw_jni.o |
20 |
$(CXX) -g -shared -Wl,-soname,libjecw.so -o libjecw.so.0.0.0 ecw_jni.o -lc -Wall -lNCSEcw -lNCScnet -lNCSUtil -L../../../../bin/linux/ |
21 |
mv ./libjecw.so.0.0.0 $(NCS_LIB_PATH) |
22 |
|
23 |
ecw_jni.o: |
24 |
$(CXX) -c ./ecw_jni.c $(CFLAGS) |
25 |
|
26 |
Ejecutar make jecw |
27 |
|
28 |
COMPILAR COMPRESOR |
29 |
|
30 |
Crear un makefile para el compresor en NCSEcw/shared_src poniendole los includes de tu m?quina |
31 |
|
32 |
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 |
33 |
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 |
34 |
LIBS = -lm -lc -lrt -ldl -lstdc++ -lsupc++ -lgcc_s -lNCSCNet -lNCSEcw -lNCSUtil |
35 |
|
36 |
all: |
37 |
gcc -O3 -c compress.cpp -Wall -Wno-long-long -fpic -DLINUX -DPOSIX $(INCLUDE) -D UNICODE -D ECW_COMPRESS -w |
38 |
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 |
39 |
|
40 |
install: |
41 |
cp ../../../../bin/linux/libNCSEcwC.so /lib |
42 |
|
43 |
clean: |
44 |
rm compress.o |
45 |
rm ../../../../bin/linux/libNCSEcwC.so |
46 |
|
47 |
|
48 |
---------------------------------- |
49 |
COMPILAR FUENTES DE ECW EN WINDOWS |
50 |
---------------------------------- |
51 |
|
52 |
Ermapper proporciona soporte para la compilaci?n de las dll en windows. Existen proyectos dentro de los fuentes |
53 |
para Visual C para compilar y enlazar las librerias. |
54 |
|
55 |
Para la generaci?n de jecw.dll crear un makefile.w32 demtro del directorio NCSEcw con el contenido: |
56 |
|
57 |
#***************************************** |
58 |
|
59 |
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" |
60 |
DSTNO_LIB = "C:\windows\system32" |
61 |
LIB_EXTERNAS = ../../../../bin/NCSUtil.lib ../../../../bin/NCSEcw.lib ../../../../bin/NCSEcwC.lib |
62 |
|
63 |
#Compiladores y Programas |
64 |
|
65 |
CC = cl.exe |
66 |
LINK = link.exe |
67 |
|
68 |
OBJS = ecw_jni.obj |
69 |
NOM_LIB = jecw |
70 |
LIB = $(NOM_LIB).dll |
71 |
|
72 |
#Directorios |
73 |
|
74 |
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" |
75 |
DEST_OBJS = ./bin |
76 |
DISTRIBUCION = ./dist |
77 |
|
78 |
#Ficheros |
79 |
|
80 |
FTE_HEADER_ECW = $(PAQUETE_ECW).JNCSFile |
81 |
|
82 |
#Opciones |
83 |
|
84 |
FLAGS = -c -W3 -G4 -D_X86_=1 -DDLL -DWIN32 -GX -MD -Zi -Od |
85 |
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) |
86 |
OPC_LINK = /nologo /dll /machine:I386 /incremental:yes /pdb:"$(NOM_LIB).pdb" /debug /out:"$(NOM_LIB).dll" /implib:"$(NOM_LIB).lib" |
87 |
VERS = 0.0.0 |
88 |
|
89 |
default: $(OBJS) $(LIB) |
90 |
|
91 |
ecw_jni.obj: |
92 |
$(CC) $(FLAGS) -I$(INCLUDE) ./src/ecw_jni.c |
93 |
|
94 |
$(LIB): |
95 |
link $(STAT_LIB) $(OPC_LINK) $(LIBR) $(OBJS) |
96 |
|
97 |
#***************************************** |
98 |
|
99 |
Comprobar que las rutas de los includes coinciden con las de nuestro Visual C |
100 |
|
101 |
Ejecutar dentro del directorio NCSEcw el comando |
102 |
nmake /f makefile.w32 |