Re: pgsql and lion : not taking good header at compilation.
От | James Hartley |
---|---|
Тема | Re: pgsql and lion : not taking good header at compilation. |
Дата | |
Msg-id | CAKeNXXsHxOML60Zp4=aPXCdfBdjhMw+5oQmaHi_BymU7mT-mHg@mail.gmail.com обсуждение исходный текст |
Ответ на | pgsql and lion : not taking good header at compilation. (Pierre-Henry Frohring <pierre.julienr@gmail.com>) |
Список | pgsql-novice |
On Mon, Jul 2, 2012 at 3:31 AM, Pierre-Henry Frohring <pierre.julienr@gmail.com> wrote:
"Undefined symbols" means that the linker has not been able to resolve all references encountered in the code when attempting to construct the executable binary.
You were half-way to the solution when you found out that commenting out the call to a PostgreSQL-specific function resulted in successful compilation *and linking*.
The fundamental problem is that the linker was unable to find the library containing function PQpingParams(). Tom is correct in noticing that the path provided is most likely incorrect. Once you correct this library path, the linker should be able to create the desired binary. Until the linker can find a library which defines this symbol, you will continue to see "undefined symbol" errors.
Here the error message :------------------------------------------------------------------------g++ db_test.o -o db_test -L /usr/local/pgsql/bin -lpqUndefined symbols for architecture x86_64:"_PQpingParams", referenced from:_main in db_test.old: symbol(s) not found for architecture x86_6
"Undefined symbols" means that the linker has not been able to resolve all references encountered in the code when attempting to construct the executable binary.
You were half-way to the solution when you found out that commenting out the call to a PostgreSQL-specific function resulted in successful compilation *and linking*.
The fundamental problem is that the linker was unable to find the library containing function PQpingParams(). Tom is correct in noticing that the path provided is most likely incorrect. Once you correct this library path, the linker should be able to create the desired binary. Until the linker can find a library which defines this symbol, you will continue to see "undefined symbol" errors.
В списке pgsql-novice по дате отправления: