Strange link error
Mathieu Dubois <[email protected]> Wed, 13 Jun 2012 11:41:29 +0200
| Newsgroups | gmane.comp.gcc.gnat |
|---|---|
| Message-ID | <[email protected]> |
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