473,606 Members | 2,825 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 2383
on 5/5/04, Jim Crate <jc****@deepsky tech.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****@deepsky tech.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
5681
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 when I started psql I got the following error when I issue this command: psql -h localhost -U postgres nba -bash-2.05b$ psql -h localhost -U postgres nba psql: error while loading shared libraries: libpq.so.3: cannot open
1
2197
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 open up postgresql to the internet. So, I'd like to tunnel the libpq connection over the existing secure socket. My preferred solution would be for the client to pass libpq an already connected file descriptor (so I can prevent binding a port...
1
4982
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 simple GUI app to display datas queried from PostgreSQL. I did make the following changes in the project's settings: Project->Properties->Directories->Include path += C:\Program
3
3000
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 error code using PQresultStatus. But returned codes are very generally and do not specify what really happen. I can get detailed error description using PQerrorMessage function, but I need detailed error code (number).
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 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...
1
2096
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. I also have Heimdal 0.6 installed and PostgreSQL was built with that support. Is the error below from something missing on the Heimdal side of things or PostgreSQL? And what does anyone suggest to resolve the issue? Maybe I need to rebuild...
2
2374
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 libpq are used by two different programs. If the same row in the same table is updated (update SQL command) through libpq and
2
2747
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 <string>
2
5312
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: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2 Ask on python-list@python.org . - Josiah
2
6163
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, 20:13:39) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "<stdin>", line 1, in ?
0
8462
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8127
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8320
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6803
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5994
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5470
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3952
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.