| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 | 1. Getting failed when connecting to postgresql #3375 | Hi, I had make a linked the libpq.a to the linker there, and copied libpq.dll to the test.cpp same folder, but it prompt me this: 8 C:testmain.cpp `PQhost' undeclared (first use this function)
Anythings i missed to call it to the compiler?
Thanks.Meow~ | 2. Re: Getting failed when connecting to postgresql #3376 Posted by: upCASE 2004-02-15 19:38:42 | Hi! Guess not. Judging from the compiler error you gave you missed to include some header file in your source. "8 C:testmain.cpp `PQhost' undeclared (first use this function)" -> Means: In linhe 8 in main.cpp you're using the class/struct/type/variable PQhost, but it hasn't been declared yet. So, you can't use it :) Check if PQhost is a variable. If so, declare it right before you use it. If it is a PQ internal type, include the header where it is 'typedef'ed.
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! | 3. Re: Getting failed when connecting to postgresql #3377 | Hi UpCase,
PQHost() is a function where it is one of the prototype in libpq.dll. Meanwhile, i can't use libpq++ and libpqxx, it seems like compile failed... :'( I don't know what files i have to include now....
Thank you.Meow~ | 4. Re: Getting failed when connecting to postgresql #3378 Posted by: upCASE 2004-02-15 21:06:52 | Hi! Never used Postgres before, but maybe this helps: http://www.postgresql.org/docs/7.4/interactive/libpq-status.html
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! | 5. Re: Getting failed when connecting to postgresql #3379 | Hi UpCase, THank you. But, it seems like i am calling the library failed, so that i can't use those functions.. :( PostgreSQL is powerful than mySQL, and most of the functions that mySQL doesn't support, but PostgreSQL do support.. :)
Meow~ | 6. Re: Getting failed when connecting to postgresql #3386 | Hi UpCase, Finally... i had successfully connected to postgreSQL with Dev-Cpp
:)Meow~ | Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
|
|