Re: MSVC build scripts status
От | Magnus Hagander |
---|---|
Тема | Re: MSVC build scripts status |
Дата | |
Msg-id | 20070925122034.GF6308@svr2.hagander.net обсуждение исходный текст |
Ответ на | Re: MSVC build scripts status (Michael Meskes <meskes@postgresql.org>) |
Ответы |
Re: MSVC build scripts status
|
Список | pgsql-hackers |
On Tue, Sep 25, 2007 at 02:13:05PM +0200, Michael Meskes wrote: > On Tue, Sep 25, 2007 at 11:07:27AM +0200, Magnus Hagander wrote: > > Oh, and I'm now seeing failures on my dev box with ECPG on the MSVC build > > using "the old way" (.bat-files): > > array_of_struct.c > > array_of_struct.pgc(26): error C2065: 'customer' : undeclared identifier > > array_of_struct.pgc(26): error C2146: syntax error : missing ';' before identifier 'custs1' > > array_of_struct.pgc(26): error C2065: 'custs1' : undeclared identifier > > array_of_struct.pgc(26): error C2109: subscript requires array or pointer type > > array_of_struct.pgc(27): error C2065: 'cust_ind' : undeclared identifier > > array_of_struct.pgc(27): error C2146: syntax error : missing ';' before identifier 'inds' > > array_of_struct.pgc(27): error C2065: 'inds' : undeclared identifier > > array_of_struct.pgc(27): error C2109: subscript requires array or pointer type > > array_of_struct.pgc(33): error C2275: 'customer2' : illegal use of this type as an expression > > array_of_struct.pgc(32) : see declaration of 'customer2' > > I do not have a Windows development setup around, so I never tried > myself but this looks strange. Could anyone please send me the .c file? > There are two possible reason: Either ecpg creates different code on > Windows, or the code that works on all Unix systems does not compile on > Windows. Irrk. The C file is very wrong indeed. Here's the relevant part where it shoudl be declaring 'customer': /* exec sql type customer is struct { #line 12 "array_of_struct.pgc" struct varchar_name_12 { int len; char arr[ 50 ]; } name ; #line 13 "array_of_struct.pgc" int phone ; } */ #line 14 "array_of_struct.pgc" (all on one line, in case the MUA wraps it) Seems like the entire definition of the struct is commented out? Are we perhaps looking at something broken by Windows newlines? Anyway, I've attached the full output file. > P.S.: Is there some documentation available on how to set up a Windows > build system? Takes less time when you know all software to install > beforehand and if you get this software at all. There's a chapter in the developer version of the docs. That combined withthe README file in src/tools/msvc should get yuo there - especially if you know a bit of Windows devving beforehand. Suggestions for improvements are always welcome though, since not a lot of people have built something off those instructions yet. //Magnus
Вложения
В списке pgsql-hackers по дате отправления: