473,513 Members | 7,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
2 2365
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5670
by: Phil Campaigne | last post by:
Hi All, Took a break from developing on pgsql 7.3 to set up network printing where I added another host(localhost 193.168.1.2) in red hat network settings. Later, I could start postmaster but...
1
2192
by: jbi130 | last post by:
I have a 3 tier client/server application where the client connection to the server which then uses PostgreSQL. I'd like to extend the client to have direct access to PostgreSQL but do not want to...
1
4968
by: Laszlo | last post by:
Hi all, As a novice I installed PostgreSQL 7.2.1 on Win32 and works, Borland C++Builder Enterprise Suite 5.0 (build 12.34) what works too. I decided to combine these two programs and develop a...
3
2990
by: Adam Bukla | last post by:
Hi! I started programming PostgreSQL database with libpq API (client side). It looks very easy, but unexpected I found problem, which I cannot solve myself. If function PQexec fails, I can get...
0
290
by: Jim Crate | last post by:
Sorry for the incomplete message before, an extremely inconvenient keyboard shortcut is being changed right now in my email client... :( I'm trying to build a client program to access a database...
1
2085
by: Robert Fitzpatrick | last post by:
I am getting the following problem with trying to install from source PHP 4.3.6 with PG support on FreeBSD 5.2.1. I have PostgreSQL 7.4.2 recently upgraded from 7.3.x and it is up and running fine....
2
2364
by: alltest1 | last post by:
Hi, I am wondering if it is thread-safe to use both JDBC and libpq simultaneously. On a Linux, JDBC is used by Tomcat and libpq is used by a client software written in C language. So JDBC and...
2
2735
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
2
5300
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
6158
by: Luis P. Mendes | last post by:
Hi, I've installed psycopg2 under Slacware 11.0 along with PostgreSQL 8.2.4. When I run the python shell I get the following error: lupe@lince ~$ python Python 2.4.3 (#1, Jul 26 2006,...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.