Re: Compiling C function with VC++ for Windows version

From: Edwin Quijada <listas_quijada(at)hotmail(dot)com>
To: <ringerc(at)ringerc(dot)id(dot)au>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Compiling C function with VC++ for Windows version
Date: 2012-01-13 12:42:16
Message-ID: BAY155-W2044CDF41AED84AAA4F6B4E39C0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> Date: Fri, 13 Jan 2012 14:44:24 +0800
> From: ringerc(at)ringerc(dot)id(dot)au
> To: listas_quijada(at)hotmail(dot)com; pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] Compiling C function with VC++ for Windows version
>
> On 13/01/2012 1:55 AM, Edwin Quijada wrote:
> >
> > Ok.
> > This is the way that I compile.
> > Linux this way works fine and I use the modules compiled. of course,
> > Linux I compile from source and I use gcc.
>
> Yep... but Windows isn't Linux.
>
> In particular, the distributions of PostgreSQL for Windows are compiled
> using Microsoft Visual C++, not gcc. It is possible to use gcc (mingw)
> to compile shared libraries that are compatible with programs compiled
> with MSVC++ but I've generally found it simpler to just use MSVC++ to
> compile libraries on Windows.
>
> If you prefer to use mingw there's still usually no problem with that,
> you'll just have to figure out why your function is crashing the server.
> Things to try:
>
> - Delete code until it stops crashing; or
> - Get a backtrace of the server to see where it crashes and why.
>
> See how I'm repeating "get a backtrace of the crash"? Check out the link
> I sent in my last post for info on how to do it using windbg or vc++
> express.
>
I am reading the backtrace to Postgres. What is the way to compile using VC++?
I mean what parameters I need to compile?

> --
> Craig Ringer
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargentg 2012-01-13 13:55:22 Re: Appending a newline to a column value - in a psql cronjob
Previous Message Alexander Farber 2012-01-13 12:11:43 Appending a newline to a column value - in a psql cronjob