Обсуждение: using libpq.lib in Microsoft C++ (managed)

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

using libpq.lib in Microsoft C++ (managed)

От
luca.ciciriello@email.it
Дата:
Hi All.
I've the necessity to call some functions of libpq.lib from my code. The problem is that my code is Managed C++ (as defined by Microsoft VisualStudio 2005). Managed C++ has a very special memory management and I don't know if using libpq.lib (an old C library) is a safe procedure. I've Already had problems using libpq.lib in a multi-threaded standard C++ and so I'm quite doubtful that all will work fine in Managed C++.

Has some one had experience concerning my doubts?

Thanks in advance.

Luca
 

----
Email.it, the professional e-mail, gratis per te: clicca qui

Sponsor:
In REGALO un GIOCO! Scegli GPBikes 3D,Bubble Boom, Rock City Empire
Clicca qui

Re: using libpq.lib in Microsoft C++ (managed)

От
Magnus Hagander
Дата:
On Wed, Oct 24, 2007 at 03:06:03PM +0200, luca.ciciriello@email.it wrote:
> Hi All.
> I've the necessity to call some functions of libpq.lib from my code. The
> problem is that my code is Managed C++ (as defined by Microsoft VisualStudio
> 2005). Managed C++ has a very special memory management and I don't know if
> using libpq.lib (an old C library) is a safe procedure. I've Already had
> problems using libpq.lib in a multi-threaded standard C++ and so I'm quite
> doubtful that all will work fine in Managed C++.
>
> Has some one had experience concerning my doubts?

If you are using Managed C++, you should probably be using npgsql instead
of libpq.

//Magnus