I am having a devil of a time with a very simple make file. The program needs two shared and one static library. If I link the shared libraries only like below the mysql test app works
------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
If I try to bring in the static library as shown below, I suddenly get an error:
/usr/bin/ld: cannot find -lmysqlpp
The static library is in the same folder as the program. I must be doing something wrong with the command structure.
BTW: Having the same issue trying to use scons to do this
You shoud not need the -static flag. I assume that libRmtDirTree.a is the static lib you try to add? If removing the -static flag does not help, try to simply add ./libRmtDirTree.a at the end of the linker command.
Hi all,
I'm having a hard time compiling a plugin (softhddevice) for the video disk recorder software (vdr). Unfortunately the last official version of the plugin was published back in 2013 and even worse it has to be compiled against ffmpeg. The last working version of ffmpeg was 2.8.x,... (0 Replies)
Hi all,
I'm reading the GNU Make book I cannot understand the following syntax from the book.
objects = foo.o bar.o
all : $(objects)
$(objects) : %.o : %.c
$(CC) -c $(CFLAGS) $< -o $@
If I run: make, I get the output:
cc -c foo.c
cc -o foo foo.o
I think I... (3 Replies)
I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message.
add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a
add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Hello.
I am new to this forum and I would like to ask for advice about low level POSIX programming.
I have to implement a POSIX compliant C shared library.
A file will have some variables and the shared library will have some functions which need those variables.
There is one special... (5 Replies)
I'm writing a program which uses curl to be run on Linux PCs which will be used by a number of different users. I cannot make the users all install curl on their individual machines, so I have tried to link curl in statically, rather than using libcurl.so. I downloaded the source and created a... (8 Replies)
I have some static library(libxxx.a libyyy.a).
And I want to generate my library(libzzz.a), libzzz.a will use libxxx.a and libyyy.a
I wan't my application only use libzzz.a, (means libzzz.a had include libxxx.a, libyyy.a), how can I do that? Thank you.
example:
I have zzz.c.
I do ... (4 Replies)
Hi,
The following is my Makefile, I wanted to add a staic library named libtimer.a. I'm using the following Makefile. Please let me know how to add this static library:
Makefile:-
It produces "usbserial" executable.
Thanks,
S (1 Reply)
I'm having trouble with my makefile, I'm trying to code a shared library to be used by another program
*EDIT* Found the solution:
CC = g++
MODULES= readconfig.o ReadConfigLib.o
OBJECTS=
RCLOBJECTS= ReadConfigLib.cpp readconfig.cpp configDefinitions.h readconfig.h ReadConfigLib.h... (0 Replies)
Hi:
I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library)
Thanks. (1 Reply)