|
|
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
|
|
|
|
|
|
Re: how to compile source files and create shared lib. [message #44644 is a reply to message #44640] |
Mon, 04 May 2015 06:29 |
|
Hi mtdew3q,
Quote:I am glad I can use synaptic and read it. Umk was going to try to wipe out theIDE. This is because umk is also in the package called theide, you should already have it installed.
Now, to the problem itself. Are you trying to create a U++ package for IBPP? Did you check the Firebird package in bazaar? It might save you some trouble, if you just need this to access firebird...
There are two ways you can use to run custom code from TheIDE. If it is ok to run them manually, you can use macros. If you need it as automatic part of the build process, then there are the custom build steps, You'll probably need to create the shared object in "pre-link" phase.
Best regards,
Honza
|
|
|
Re: how to compile source files and create shared lib. [message #44645 is a reply to message #44644] |
Mon, 04 May 2015 07:13 |
|
Hi-
I followed the link to the macro. I kind of get the mini scripting language. I couldn't figure out after I create the macro where to put the .usc file and how to execute it though.
Where is the common or local directory? I think they are bound to a key combination... right?
For i.e. this code goes in .usc file but how to execute it? Thanks for elaborating!
macro "Insert current date" {
s = [];
tm = GetSysTime();
s << to_string(tm.year) << "-" << to_string(tm.month) << "-" << to_string(tm.day);
.Insert(s);
}
|
|
|
|
Re: how to compile source files and create shared lib. [message #44647 is a reply to message #44645] |
Mon, 04 May 2015 07:41 |
|
mtdew3q wrote on Mon, 04 May 2015 07:13Hi-
I followed the link to the macro. I kind of get the mini scripting language. I couldn't figure out after I create the macro where to put the .usc file and how to execute it though.
Where is the common or local directory? I think they are bound to a key combination... right?
Just put the *.usc file in your pacakge.
You can bind a keyboard shortcut to the macro, or you can execute it via Macro menu, which appears in theide as soon as you have any package containing usc file in your project.
Honza
|
|
|
|
Goto Forum:
Current Time: Sat Oct 05 11:52:06 CEST 2024
Total time taken to generate the page: 0.01974 seconds
|
|
|