Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » how to compile source files and create shared lib.
how to compile source files and create shared lib. [message #44640] |
Mon, 04 May 2015 04:26  |
|
HI-
I am trying to find an example to compile like this (any links I can read please?) I can check syntax in IDE but then have to go outside IDE
to make shared file. I put my .cpp, .h, in upp package directory by including
them. There are 20 or so .cpp files. I am compiling and building IBPP
for firebird. It links inside upp with message 'ok'. Any cool tips are appreciated!
CC = g++
CFLAGS = -fPIC -pedantic -Wall -shared
DEBUGFLAGS = -O0 -DIBPP_LINUX -DIBPP_GCC -std=c++11
INCLUDES = -I../ibpp_headers
LFLAGS = -L../fb_libs -L/usr/lib/x86_64-linux-gnu
LIBS = -lfbclient -lm -lpthread -lcrypt
SRCS = array.cpp blob.cpp database.cpp date.cpp dbkey.cpp \
_dpb.cpp events.cpp exception.cpp _ibpp.cpp _ibs.cpp \
_rb.cpp row.cpp service.cpp _spb.cpp statement.cpp \
time.cpp _tpb.cpp transaction.cpp user.cpp \
OBJS = $(SRCS:.c=.o)
TARGET = sqlFB.so
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) $(DEBUGFLAGS) $(INCLUDES) -o $(TARGET) $(OBJS) $(LFLAGS) $(LIBS)
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
$(RM) *.o *~ $(TARGET)
depend: $(SRCS)
makedepend $(INCLUDES) $^
# DO NOT DELETE THIS LINE -- make depend needs it
|
|
|
Goto Forum:
Current Time: Mon Apr 28 13:45:36 CEST 2025
Total time taken to generate the page: 0.00800 seconds
|