Обсуждение: libpq.dll

Поиск
Список
Период
Сортировка

libpq.dll

От
Stéphane Pinel
Дата:
Is there a libpq.dll that I can link to a Visual C++ .Net project
exactly the way
I do it with libpq on my Darwin box ?

Thanks.

------------------------------------------------------------------------
-------------------------
Stéphane Pinel
------------------------------------------------------------------------
-------------------------


Re: libpq.dll

От
Mathieu Arnold
Дата:

--Le 12/04/2003 19:16 +0200, Stéphane Pinel écrivait :

| Is there a libpq.dll that I can link to a Visual C++ .Net project
| exactly the way I do it with libpq on my Darwin box ?
|
| Thanks.

I guess you should have a look at :
<http://gborg.postgresql.org/project/npgsql/projdisplay.php>

--
Mathieu Arnold



Re: libpq.dll

От
Stéphane Pinel
Дата:
Le samedi, 12 avr 2003, à 19:20 Europe/Paris, Mathieu Arnold a écrit :

>
>
> --Le 12/04/2003 19:16 +0200, Stéphane Pinel écrivait :
>
> | Is there a libpq.dll that I can link to a Visual C++ .Net project
> | exactly the way I do it with libpq on my Darwin box ?
> |
> | Thanks.
>
> I guess you should have a look at :
> <http://gborg.postgresql.org/project/npgsql/projdisplay.php>
>

Thanks

I saw this project but I read:

"Npgsql is implemented in C#"

I just want to use C. To be more specific, I've developed a C client on
Darwin,
using libpq.lib and I would like to re-use my code (calls to libpq C
lib) in a
Visual C++ .Net (Win32) project. The ideal should be to have not much
work
to port it ;-)

But since I'm not a win32 hacker, I would like to know if I can use a
.dll or static
lib that could help me to do that without hacking in a win32
environment that
I don't know.

Regards.

------------------------------------------------------------------------
-------------------------
Stéphane Pinel
------------------------------------------------------------------------
-------------------------



Re: libpq.dll

От
Mathieu Arnold
Дата:

--Le 12/04/2003 19:32 +0200, Stéphane Pinel écrivait :

|
| Le samedi, 12 avr 2003, à 19:20 Europe/Paris, Mathieu Arnold a écrit :
|
|>
|>
|> --Le 12/04/2003 19:16 +0200, Stéphane Pinel écrivait :
|>
|> | Is there a libpq.dll that I can link to a Visual C++ .Net project
|> | exactly the way I do it with libpq on my Darwin box ?
|> |
|> | Thanks.
|>
|> I guess you should have a look at :
|> <http://gborg.postgresql.org/project/npgsql/projdisplay.php>
|>
|
| Thanks
|
| I saw this project but I read:
|
| "Npgsql is implemented in C#"
|
| I just want to use C. To be more specific, I've developed a C client on
| Darwin, using libpq.lib and I would like to re-use my code (calls to
| libpq C  lib) in a Visual C++ .Net (Win32) project. The ideal should be
| to have not much  work to port it ;-)
|
| But since I'm not a win32 hacker, I would like to know if I can use a
| .dll or static lib that could help me to do that without hacking in a
| win32  environment that I don't know.

Implemented != can be used with
The thing is that I believe that you could find a libpq.dll from the win32
postgresql port, but, you're using V .Net, and so, you should use a .Net
data provider, thus, npgsql, which is just that. If you get npgsql, you'll
have a nice dll you can add to your project's references, and then,
using Npgsql;
if you use C#, or in your case, well, hum, I'm not quite good enough with
visual studio to tell you how to use a dll with your project, but it must
be possible in a way or another.

--
Mathieu Arnold



Re: libpq.dll

От
Stéphane Pinel
Дата:
Le samedi, 12 avr 2003, à 20:14 Europe/Paris, Mathieu Arnold a écrit :

> The thing is that I believe that you could find a libpq.dll from the
> win32
> postgresql port, but, you're using V .Net, and so, you should use a
> .Net
> data provider, thus, npgsql, which is just that. If you get npgsql,
> you'll
> have a nice dll you can add to your project's references, and then,
> using Npgsql;
> if you use C#, or in your case, well, hum, I'm not quite good enough
> with
> visual studio to tell you how to use a dll with your project, but it
> must
> be possible in a way or another.
>

So there is no lib that can be linked without other stuff just like we
use to do
with libpq.a on Darwin (or Unix) ?

My app doesn't handle any GUI stuff. It just a libpq C wrapper. My main
need
is to be able to execute "conn = PQconnectdb(cinfo);" etc... in a
Visual C++
project.

Regards.

------------------------------------------------------------------------
-------------------------
Stéphane Pinel
------------------------------------------------------------------------
-------------------------



Re: libpq.dll

От
Mathieu Arnold
Дата:

--Le 12/04/2003 20:32 +0200, Stéphane Pinel écrivait :

|
| Le samedi, 12 avr 2003, à 20:14 Europe/Paris, Mathieu Arnold a écrit :
|
|> The thing is that I believe that you could find a libpq.dll from the
|> win32
|> postgresql port, but, you're using V .Net, and so, you should use a
|> .Net
|> data provider, thus, npgsql, which is just that. If you get npgsql,
|> you'll
|> have a nice dll you can add to your project's references, and then,
|> using Npgsql;
|> if you use C#, or in your case, well, hum, I'm not quite good enough
|> with
|> visual studio to tell you how to use a dll with your project, but it
|> must
|> be possible in a way or another.
|>
|
| So there is no lib that can be linked without other stuff just like we
| use to do with libpq.a on Darwin (or Unix) ?
|
| My app doesn't handle any GUI stuff. It just a libpq C wrapper. My main
| need is to be able to execute "conn = PQconnectdb(cinfo);" etc... in a
| Visual C++ project.

Well, I don't know what is the status of the win32 postgresql port, maybe
there is a libpq.dll, maybe not. What I know, is that you can use Npgsql in
a close way from what you use libpq.

--
Mathieu Arnold



Re: libpq.dll

От
Stéphane Pinel
Дата:
Le samedi, 12 avr 2003, à 20:40 Europe/Paris, Mathieu Arnold a écrit :

> Well, I don't know what is the status of the win32 postgresql port,
> maybe
> there is a libpq.dll, maybe not. What I know, is that you can use
> Npgsql in
> a close way from what you use libpq.
>

OK. I will look more closely at Npgsql.

Thanks.

------------------------------------------------------------------------
-------------------------
Stéphane Pinel
------------------------------------------------------------------------
-------------------------



Re: libpq.dll

От
"Magnus Hagander"
Дата:
> > The thing is that I believe that you could find a libpq.dll from the
> > win32
> > postgresql port, but, you're using V .Net, and so, you
> should use a
> > .Net
> > data provider, thus, npgsql, which is just that. If you get
> npgsql,
> > you'll
> > have a nice dll you can add to your project's references, and then,
> > using Npgsql;
> > if you use C#, or in your case, well, hum, I'm not quite
> good enough
> > with
> > visual studio to tell you how to use a dll with your
> project, but it
> > must
> > be possible in a way or another.
> >
>
> So there is no lib that can be linked without other stuff
> just like we
> use to do
> with libpq.a on Darwin (or Unix) ?
>
> My app doesn't handle any GUI stuff. It just a libpq C
> wrapper. My main
> need
> is to be able to execute "conn = PQconnectdb(cinfo);" etc... in a
> Visual C++
> project.


This sounds like you are developing a Native Application using VC++ .Net. Npgsql (and all other .Net classes) are only
forwhat MS calls "Managed Applications". You can write managed apps in C#, VB, C++ or whatever. But only VC++ can
createa native application. A native application in VC++.Net is basically the same kind of apploication you would
createin any previous version of Visual Studio. 

Anyway, to the point. Check out the "Installing on Windows" part of the Administrators Guide for instructions on how to
buildthe DLL and LIB files necessary to use libpq from a native app. 
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=install-win32.html


//Magnus