Every

I'm porting my cygwin DB access programs to native win32
environment with mingw gcc, but something was incorrect
during my linking stage(The C code was generated by ecpg.exe
from a pgc file).  It seemed to be caused by incomplete
libraries(lack of ECPGdo, sqlca, etc), because the linking
process could be done with libraries from
http://hp.vector.co.jp/authors/VA023283/PostgreSQLe.html
(but all libraries were SJIS fixed encoding).
Is there any way to solve my problem?
Thanks!

Shi-Sen










Every
 
I'm porting my cygwin DB access programs to native 
win32
environment with mingw gcc, but something was 
incorrect
during my linking 
stage(The C code was generated by ecpg.exe
from a pgc file).  It seemed to be caused by 
incomplete
libraries(lack of ECPGdo, sqlca, etc), because the 
linking
process could be done with libraries from
http://hp.vector.co.jp/authors/VA023283/PostgreSQLe.html
(but all libraries were SJIS fixed 
encoding).
Is there any way to solve my problem?
Thanks!
 
Shi-Sen
Wed, 23 Apr 2003 19:38:50 +0800
Shi-Sen Chang <sschang@netrd.iii.org.tw>
linking problem with gcc-mingw
Hi Shi-Sen.

Thank you for downloading.
It doesn't interpret ecpg in being disappointed.

The offer that Jan Wieck is wonderful. 
If you are not subscribed to the patches list you can download them from
http://www.janwieck.net/win32_port

And, there is wonderful release.
It is said as PowerGres, and it is postgres which is the most suitable for
Windows of the Thread edition.
http://osb.sra.co.jp/PowerGres/
(japanese)
But, this doesn't support ecpg.

kindest regards,
SAITO Hiroshi

 ----- Original Message ----- 
From: Shi-Sen Chang 
To: PostgreSQL Hackers 
Sent: Wednesday, April 23, 2003 8:38 PM
Subject: [HACKERS] linking problem with gcc-mingw


> Every
> 
> I'm porting my cygwin DB access programs to native win32
> environment with mingw gcc, but something was incorrect
> during my linking stage(The C code was generated by ecpg.exe
> from a pgc file).  It seemed to be caused by incomplete
> libraries(lack of ECPGdo, sqlca, etc), because the linking
> process could be done with libraries from
> http://hp.vector.co.jp/authors/VA023283/PostgreSQLe.html
> (but all libraries were SJIS fixed encoding).
> Is there any way to solve my problem?
> Thanks!
>
> Shi-Sen


Thu, 24 Apr 2003 01:37:28 +0900
"Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
Re: linking problem with gcc-mingw
Thanks!
after some modifications on the source codes, I got what I want!!

My patch file ......
============================================================================
==============
diff -burN postgresql-7.2.1/src/interfaces/ecpg/include/sqlca.h
postgresql-7.2.1w/src/interfaces/ecpg/include/sqlca.h
--- postgresql-7.2.1/src/interfaces/ecpg/include/sqlca.h 2003-04-24
13:58:58.000000000 +0800
+++ postgresql-7.2.1w/src/interfaces/ecpg/include/sqlca.h 2003-04-25
16:08:02.000000000 +0800
@@ -2,7 +2,7 @@
 #define POSTGRES_SQLCA_H

 #ifndef DLLIMPORT
-#if defined(__CYGWIN__) || defined(PG_WIN32)
+#if defined(__CYGWIN__) || defined(PG_WIN32) || defined(__MINGW32__)
 #define DLLIMPORT __declspec (dllimport)
 #else
 #define DLLIMPORT
Binary files postgresql-7.2.1/src/postgres.ncb and
postgresql-7.2.1w/src/postgres.ncb differ
Binary files postgresql-7.2.1/src/postgres.opt and
postgresql-7.2.1w/src/postgres.opt differ
diff -burN postgresql-7.2.1/src/win32_support/ecpg_lib.def
postgresql-7.2.1w/src/win32_support/ecpg_lib.def
--- postgresql-7.2.1/src/win32_support/ecpg_lib.def 1970-01-01
08:00:00.000000000 +0800
+++ postgresql-7.2.1w/src/win32_support/ecpg_lib.def 2003-04-25
16:08:30.000000000 +0800
@@ -0,0 +1,24 @@
+LIBRARY LIBECPG
+EXPORTS
+ ECPGdebug @ 1
+ ECPGstatus @ 2
+ ECPGsetcommit @ 3
+ ECPGsetconn @ 4
+ ECPGconnect @ 5
+ ECPGdo @ 6
+ ECPGtrans @ 7
+ ECPGdisconnect @ 8
+ ECPGprepare @ 9
+ ECPGdeallocate @ 10
+ ECPGdeallocate_all @ 11
+ ECPGprepared_statement @ 12
+ ECPGlog @ 13
+ sqlprint @ 14
+ ECPGdo_descriptor @ 15
+ ECPGdeallocate_desc @ 16
+ ECPGallocate_desc @ 17
+ ECPGraise @ 18
+ ECPGget_desc_header @ 19
+ ECPGget_desc @ 20
+ ECPGfree_auto_mem @ 21
+ sqlca @ 22
diff -burN postgresql-7.2.1/src/win32_support/ecpg_lib.dsp
postgresql-7.2.1w/src/win32_support/ecpg_lib.dsp
--- postgresql-7.2.1/src/win32_support/ecpg_lib.dsp 2003-04-24
12:08:10.000000000 +0800
+++ postgresql-7.2.1w/src/win32_support/ecpg_lib.dsp 2003-04-25
16:08:30.000000000 +0800
@@ -126,6 +126,10 @@

 SOURCE=..\interfaces\ecpg\lib\typename.c
 # End Source File
+# Begin Source File
+
+SOURCE=.\ecpg_lib.def
+# End Source File
 # End Group
 # End Target
 # End Project
============================================================================
==================

Shi-Sen

----- Original Message -----
From: "Hiroshi Saito" <saito@inetrt.skcapi.co.jp>
To: <pgsql-hackers@postgresql.org>
Sent: Thursday, April 24, 2003 12:37 AM
Subject: Re: [HACKERS] linking problem with gcc-mingw


> Hi Shi-Sen.
>
> Thank you for downloading.
> It doesn't interpret ecpg in being disappointed.
>
> The offer that Jan Wieck is wonderful.
> If you are not subscribed to the patches list you can download them from
> http://www.janwieck.net/win32_port
>
> And, there is wonderful release.
> It is said as PowerGres, and it is postgres which is the most suitable for
> Windows of the Thread edition.
> http://osb.sra.co.jp/PowerGres/
> (japanese)
> But, this doesn't support ecpg.
>
> kindest regards,
> SAITO Hiroshi
>
>  ----- Original Message -----
> From: Shi-Sen Chang
> To: PostgreSQL Hackers
> Sent: Wednesday, April 23, 2003 8:38 PM
> Subject: [HACKERS] linking problem with gcc-mingw
>
>
> > Every
> >
> > I'm porting my cygwin DB access programs to native win32
> > environment with mingw gcc, but something was incorrect
> > during my linking stage(The C code was generated by ecpg.exe
> > from a pgc file).  It seemed to be caused by incomplete
> > libraries(lack of ECPGdo, sqlca, etc), because the linking
> > process could be done with libraries from
> > http://hp.vector.co.jp/authors/VA023283/PostgreSQLe.html
> > (but all libraries were SJIS fixed encoding).
> > Is there any way to solve my problem?
> > Thanks!
> >
> > Shi-Sen
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


Fri, 25 Apr 2003 16:28:50 +0800
Shi-Sen Chang <sschang@netrd.iii.org.tw>
Re: linking problem with gcc-mingw