The problem is solved.
I had a very stupid mistake made in my project settings:
INCLUDEPATH += foopath \
DESTDIR = foolib
I had a trailing backslash at the end of a define and therefore the library
wasn't copied. Initially i had moved the library manually.
Thanks for your time.
Am Freitag, d
I might know what the problem is. I have to run ranlib to create the
index of the archieve.
How to do it at QT Creator ?
Am Freitag, den 22.10.2010, 01:17 +1100 schrieb Alexander 'hatred'
Drozdoff:
> В Thu, 21 Oct 2010 13:32:55 +0200
> Erwin Brandenberger пишет:
>
> EB> Yes of course, the libr
I have c++ libraries in the same path, but this references can be
solved.
Am Freitag, den 22.10.2010, 01:17 +1100 schrieb Alexander 'hatred'
Drozdoff:
> В Thu, 21 Oct 2010 13:32:55 +0200
> Erwin Brandenberger пишет:
>
> EB> Yes of course, the library will be build:
> EB>
> EB> ar cqs libfoo.a
В Thu, 21 Oct 2010 13:32:55 +0200
Erwin Brandenberger пишет:
EB> Yes of course, the library will be build:
EB>
EB> ar cqs libfoo.a foo.o
EB>
Is compilation fail if you instead -lfoo pass full path to libfoo.a? like
LIBS += /path/libfoo.a
???
Look like linker does not found library in path... Tr
Yes of course, the library will be build:
ar cqs libfoo.a foo.o
Am Donnerstag, den 21.10.2010, 14:24 +0300 schrieb Alex T.:
> Do you have libfoo.a in that directory after compilation? Because it
> looks like that you will have only foo.o there.
>
> On 21 October 2010 14:17, Erwin Brandenberger
Do you have libfoo.a in that directory after compilation? Because it looks
like that you will have only foo.o there.
On 21 October 2010 14:17, Erwin Brandenberger wrote:
> The qt creators foo.pro file looks like this:
>
> QT -= core gui
> TARGET = foo
> TEMPLATE = lib
> CONFIG += staticlib
The qt creators foo.pro file looks like this:
QT -= core gui
TARGET = foo
TEMPLATE = lib
CONFIG += staticlib warn_off
unix:DEFINES += RUN_LINUX \
RUN_UNIX
win32:DEFINES += RUN_NT
Yes there is a -fPIC option set. Do I have to switch off it ? How do I do it ?
gcc -c -pipe -g -w -fPIC -D_REEN
В Wed, 20 Oct 2010 10:34:06 +0200
Erwin Brandenberger пишет:
EB> I like to compile c code building a static library and then linking this
EB> library from a c++ project.
EB>
EB> But for all c-function calls I get undefined reference.
EB>
What compilation options do you use for build library? D
I like to compile c code building a static library and then linking this
library from a c++ project.
But for all c-function calls I get undefined reference.
The static c-library is referenced by the c++ project in the .pro file:
LIBS += -lfoo
What goes wrong ?
The c files look like this:
int