Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to compile non C/C++ files in an U++ project
Next Topic: Debugging mouse over popup need to be improved
Goto Forum:
  


Current Time: Thu Apr 25 17:39:27 CEST 2024

Total time taken to generate the page: 0.02112 seconds