Just for clarification,
Now that Mike refreshes my memory, the stdio.h include was also in my list of problems. As I indicated in the previous post, I also had some strange issues with hidden characters, but that was on perhaps only 2-3 lines. Also as previously indicated, I had a problem with a function that creates a temporary file and returns a handle to it. I could not find that function (mkstemp) in any of the standard header files provided with VC++6 (though I wonder whether that wasn't an install issue on our end), so we just wrote our own. From there life was great other than the basic operational learning curve issues than I'm still dealing with.
One side note - lest I sound all negative about the W32 build - the 2.0.19 build is *substantially* easier to build than the 2.0.11 build. I have to believe that this was due to some serious effort on someone's part to roll some of the changes that used to be required into the core build. To whoever did that effort - thanks (trying to build 2.0.11 was driving me crazy making sure I had ever little change perfect).
Rob
-----Original Message-----
From: Mike D'Arcy [mailto:mdarcy@ISI.EDU]
Sent: Monday, January 07, 2002 7:04 PM
To: 'De Leeuw Guy'; 'OpenLdap (E-mail)'
Subject: 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