Hi!
In my project, I have to make a .so . In order to create the .so, I also need to compile some files:
this is how the makefile looks like:
CC = g++
FLAGS_FPIC = -fPIC -m32 -I$(APP_INCL) -I$(CSI_INCL) -I$(MQ_INCL) -g
(APP_INCL, CSI_INCL, MQ_INCL are paths to my .h files.)
then, to create the .o files, i use:
Bind.o: $(APP_SRC)/Bind.c
$(CC) -c $(FLAGS_FPIC) $(APP_SRC)/Bind.c
Init.o: $(APP_SRC)/Init.c
$(CC) -c $(FLAGS_FPIC) $(APP_SRC)/Init.c
.......
to create the .so then, I use:
FLAGS_SO_LIBS = -L$(CSI_LIB) \
-lcsi_hlclient \
-lcsi_report \
-lm
FLAGS_SO = -m32 -shared $(FLAGS_SO_LIBS) -lc -W1
$(CC) $(FLAGS_SO),-soname,libZziCsiLib32.so.1 -o libZziCsiLib32.so.1.0.1 Bind.o Init.o Connect.o Put.o Get.o Disconnect.o Term.o
When I try compiling, the compiler compiles the .c files, creates the .so, but when i try to compile the test class, where I use the library, it doesn't seem to see the functions, declared in the .h files , included to compile the .c files
Any idea?
Thanks, Rok