[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Win32 compilation problem



Hi Guy,

I had the same problem building Win32 OpenLDAP "right out of the box" at
first, but you can workaround it pretty easily.

The problem is proto-slap.h doesn't know about struct FILE - which is
declared in <stdio.h>.

The simple workaround is to add #include <stdio.h> to the top of
proto-slap.h.

But, just to make sure it didn't bite me again I added the following to
portable.nt and then rebuilt 'setup':

/* we have <stdio.h> */
#define HAVE_STDIO_H 1

#ifdef HAVE_STDIO_H
#	include <stdio.h>
#endif

Which works fine and seems to me like the right thing to do.  Other than
that, you should be able to get slapd to build as long as you've made
sure to build REGEX, SASL and BerkeleyDB and get them into your linker
and runtime paths.

IMHO, I actually found the whole OpenLDAP VC++ project workspace pretty
darned well organized for dealing with unix/windows build issues.  It
was actually a significant reason why I decided to try to work with the
Win32 port in the first place.

Anyway, hope this helps and good luck!

Mike

-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org] On Behalf Of De Leeuw Guy
Sent: Monday, January 07, 2002 6:46 AM
To: OpenLdap (E-mail)
Subject: Win32 compilation problem


Hello,

I try to build the 2.0.19 on win32, but I receive this errors :

--------------------Configuration: setup - Win32
Debug--------------------
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.  copy
setup.mak setup.txt
        1 fichier(s) copi,(s).
--------------------Configuration: libslapd - Win32
Debug--------------------
Compiling...
mods.c
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(392
) : error C2143: syntax error : missing '{' before '*'
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(392
) : error C2143: syntax error : missing ')' before '*'
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(392
) : error C2081: 'FILE' : name in formal parameter list illegal
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(392
) : error C2143: syntax error : missing '{' before '*'
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(392
) : error C2059: syntax error : ')'
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(393
) : error C2143: syntax error : missing ')' before '*'
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(393
) : error C2143: syntax error : missing '{' before '*'
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(393
) : error C2143: syntax error : missing ';' before '*'
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(393
) : error C2059: syntax error : ')'
D:\Ef\Dev\Shared\OpenLdap\openldap-2.0.19\servers\slapd\proto-slap.h(393
) : error C2040: 'lfp' : 'int *' differs in levels of indirection from
'int ** ' Error executing cl.exe.

build.exe - 10 error(s), 0 warning(s)

How can I correct this ?

Thanks in advance,
Guy