• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa Database Connection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Database Connection


  • Subject: Re: Cocoa Database Connection
  • From: Western Botanicals <email@hidden>
  • Date: Mon, 24 Mar 2008 13:21:47 -0600

Thank you to everyone who has responded so far. I ended up fixing the problem by importing the "postgres_ext.h" file into my project (I wish I could have just done a find for it).

But now with the following code:

#import <Cocoa/Cocoa.h>
#include <libpq-fe.h>

int main(int argc, char *argv[])
{
	char *conninfo = "";
	PGconn     *conn;

	conn = PQconnectdb(conninfo);

    return NSApplicationMain(argc,  (const char **) argv);
}

I get the following error when I try to compile:

"_PQconnectdb", referenced from:
_main in main.o
symbol(s) not found
collect2: ld returned 1 exit status

Is this code incorrect, or do I need to import something else?

Thank you,

Justin Giboney
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cocoa Database Connection
      • From: Jeff LaMarche <email@hidden>
References: 
 >Cocoa Database Connection (From: Justin Giboney <email@hidden>)
 >Re: Cocoa Database Connection (From: Justin Giboney <email@hidden>)

  • Prev by Date: Re: Writing a preference pane that configures hotkeys?
  • Next by Date: Re: Communications between multiple NIB's
  • Previous by thread: Re: Cocoa Database Connection
  • Next by thread: Re: Cocoa Database Connection
  • Index(es):
    • Date
    • Thread