Home » U++ Library support » U++ SQL » can I use 127.0.0.1 as host in open function?
can I use 127.0.0.1 as host in open function? [message #52523] |
Thu, 17 October 2019 03:05  |
|
Hi Postgres users,
Can I use 127.0.0.1 instead of localhost for my host?
if(!m_session.Open("host=127.0.0.1 dbname=test user=myuser password=mypassword"))
I can log into the db with
psql -h 127.0.0.1 -d test -U myuser
and then entering mypassword at the prompt.
Not sure why I can't seem to get it to run.
My environments are Cygwin PostgreSQL backend and the U++ libpq.a client code that Mirek has going on for the front end.
I don't think it matters if I connect to a Cygwin db running on that host even if Cygwin isn't using MinGW.
I probably can mix the client and server as different environments.
thnx,
roboloki
|
|
|
|
|
|
Re: can I use 127.0.0.1 as host in open function? [message #52529 is a reply to message #52528] |
Fri, 18 October 2019 01:08  |
|
hi zsolt-
I figured out the issues I had. It stems from not having the .a file for libpq.a for MinGW.
I need to get MinGW to get the .a file for the client instead of the .a file for Cygwin libpq.a
Well that is an easy fix. I just need to download another copy of MInGW. I think. Then I will use the ./configure and make and generate a PostgreSQL libpq.a and replace the Cygwin one. Then it will work.
It is not that I am mixing environments rather I didn't do it correctly.
thnx,
roboloki
|
|
|
Goto Forum:
Current Time: Sun Apr 27 18:43:08 CEST 2025
Total time taken to generate the page: 0.03762 seconds
|