467,074 Members | 895 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,074 developers. It's quick & easy.

Error linking libpq into client program

I'm trying to build a client program to access a database using the libpq
interface on MacOS X 10.3.3 using CodeWarrior 9. PostgreSQL is at version
7.4.2.

It compiles ok, but I get a link error. I have linked to libpq.a, because I got
different errors before I did that. Here is the error I'm getting right now:

Link Error: undefined: '@_1' (code)
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #1
  • viewed: 2074
Share:
2 Replies
on 5/5/04, Jim Crate <jc****@deepskytech.com> wrote:
I'm trying to build a client program to access a database using the libpq
interface on MacOS X 10.3.3 using CodeWarrior 9. PostgreSQL is at version
7.4.2.

It compiles ok, but I get a link error. I have linked to libpq.a, becauseI gotdifferent errors before I did that. Here is the error I'm getting right now:

Link Error: undefined: '@_1' (code)
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a


As an update, I moved the project to Xcode (which uses gcc), and it compiles
and links just fine. I guess this was just a problem with CW? Does this work
with other compilers?

Jim Crate
Deep Sky Technologies, Inc.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2
on 5/5/04, Jim Crate <jc****@deepskytech.com> wrote:
I'm trying to build a client program to access a database using the libpq
interface on MacOS X 10.3.3 using CodeWarrior 9. PostgreSQL is at version
7.4.2.

It compiles ok, but I get a link error. I have linked to libpq.a, becauseI gotdifferent errors before I did that. Here is the error I'm getting right now:

Link Error: undefined: '@_1' (code)
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a
Referenced from 'pqSetenvPoll' in libpq.a


As an update, I moved the project to Xcode (which uses gcc), and it compiles
and links just fine. I guess this was just a problem with CW? Does this work
with other compilers?

Jim Crate
Deep Sky Technologies, Inc.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Phil Campaigne | last post: by
1 post views Thread by jbi130@yahoo.com | last post: by
1 post views Thread by Laszlo | last post: by
reply views Thread by Jim Crate | last post: by
1 post views Thread by Robert Fitzpatrick | last post: by
2 posts views Thread by alltest1 | last post: by
2 posts views Thread by Luis P. Mendes | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.