help-gnat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange link error


From: Mathieu Dubois
Subject: Strange link error
Date: Wed, 13 Jun 2012 11:41:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

Hello,

I use gnatmake and a GPR file to build a project and I recently faced an error that I don't understand. The problem arose when we moved some stuff in our SVN repository but I would be really surprised that this caused the problem.

The situation is as follow. The GPR project is located in a subdirectory (say foo/my_project/my_project.gpr). It uses other projects which are given by their relative path in with clauses. The project uses the APQ 2.1 library which is installed in GCC path (apq.ads is in /usr/lib/gcc/x86_64-linux-gnu/4.6/rts-native/adainclude/, apq.ali is in /usr/lib/gcc/x86_64-linux-gnu/4.6/rts-native/adalib/apq.ali).

Due to the modifications on the repository I have indeed two copies of my_project: let's say that the current working is under foo/ and I have a unversionned copy under foo_tmp.

Under foo_tmp/my_project everything works fine (gnatmake -P my_project.gpr works nicely).
Under foo/my_project the same command leads to a link error:
gnatlink /home/duboism/Documents/These/Code/manips/rvg/manips/DB_Handler/objs/test_requestimage.ali -shared-libgcc -g -o /home/duboism/Documents/These/Code/manips/rvg/manips/DB_Handler/test_requestimage /usr/lib/gcc/x86_64-linux-gnu/4.6/adalib//libapq.a(apq-postgresql-client.o): In function `apq__postgresql__client__host_name':
apq-postgresql-client.adb:(.text+0x6d0): undefined reference to `PQhost'
...

I can't figure out what's going on.
As far as I can tell the commands are the same (I watched the logs the only diffence is foo_tmp being replace by foo).
The GPR files are the same and the relative path too.
I use gnatclean -r -P my_project.gpr before using gnatmake...

Any idea?

Thanks in advance,
Mathieu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]