pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Compiling and linking a Program interfacing with libpq.dll
3+ messages / 2 participants
[nested] [flat]

* Compiling and linking a Program interfacing with libpq.dll
@ 2006-01-09 03:57  Michael <michael_atkisson@comcast.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael @ 2006-01-09 03:57 UTC (permalink / raw)
  To: pgsql-interfaces

I am trying to compile, link and execute the first example in the
Postgres 8.1.1
manual using the libpq.dll library.  Nothing I have tried works.  I am
using
the free Borland Compiler 5.5.  Can any give me the command line
parameters
for compiling and linking a C program using this compiler.  I have
tried everything
I can think of, referenced the section 28.15 for compiling and linking.
 Also I have
searched the archives and found nothing that helped.

Thanks!




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Compiling and linking a Program interfacing with libpq.dll
@ 2006-01-09 23:03  Gustavo Lopes <contratempo@gmail.com>
  parent: Michael <michael_atkisson@comcast.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Gustavo Lopes @ 2006-01-09 23:03 UTC (permalink / raw)
  To: Michael <michael_atkisson@comcast.net>; +Cc: pgsql-interfaces

I think you'll need to generate the import library first (the one
included only works for gcc). Anyway, I've experienced problems when
the programs are not linked against msvcrt.dll; if you should find
your programs crashing for no apparent reason, try to use mingw (with
which you won't need to generate an import library) or vc6 with the
/MD switch.

Gustavo Lopes

On 8 Jan 2006 19:57:33 -0800, Michael <michael_atkisson@comcast.net> wrote:
> I am trying to compile, link and execute the first example in the
> Postgres 8.1.1
> manual using the libpq.dll library.  Nothing I have tried works.  I am
> using
> the free Borland Compiler 5.5.  Can any give me the command line
> parameters
> for compiling and linking a C program using this compiler.  I have
> tried everything
> I can think of, referenced the section 28.15 for compiling and linking.
>  Also I have
> searched the archives and found nothing that helped.
>
> Thanks!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>


--
Gustavo Lopes



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Compiling and linking a Program interfacing with libpq.dll
@ 2006-01-22 07:38  Michael <michael_atkisson@comcast.net>
  parent: Gustavo Lopes <contratempo@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael @ 2006-01-22 07:38 UTC (permalink / raw)
  To: pgsql-interfaces

Thanks for your reply.  I took me a while but, I am glad you
told me to rebuild the import library.  Also the part about
linking against msvcrt was important.  I was able rebuild
the import library using the bcc32.mak file. It did something
I didn't expect which was to create some of the new files with
a 'b' prepended to their names such as blibpq.  Anyway in
the smalltalk compiler which I am using, it uses bcc32 to compile
primitives and I am now able to access postgres with the
methods I am writing.

Thanks again!




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-01-22 07:38 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-09 03:57 Compiling and linking a Program interfacing with libpq.dll Michael <michael_atkisson@comcast.net>
2006-01-09 23:03 ` Gustavo Lopes <contratempo@gmail.com>
2006-01-22 07:38   ` Michael <michael_atkisson@comcast.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox