Compiling with MSVC6

Hi, Chacking out tthe latest SVN version I had to manually change in smi.h: #ifdef HAVE_LIMITS_H #include "limits.h" #endif to #include "limits.h"
Any ideas why? Regards Anders

On Thu, Mar 27, 2008 at 08:53:08AM +0100, Anders Broman wrote:
Chacking out tthe latest SVN version I had to manually change in smi.h: #ifdef HAVE_LIMITS_H #include "limits.h" #endif to #include "limits.h"
Any ideas why?
I have no clue if "limits.h" generally exists on Win32 compilers. If it does, we could simply define HAVE_LIMITS_H in win/config.h.
/js

Hi, I just checked out a fresh SVN version 7967 and inspite of the recent changes I get: C:\libsmi\trunk\win>nmake -f makefile
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cl -Z7 -Od -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -D _WINNT -D_WIN32_WINNT=0x0400 -D_WIN32_IE=0x0300 -DWINVER=0x0400 -I...\lib -I.. .\win -IC:\PROGRA~1\MICROS~2\VC98\include -D_CRT_SECURE_NO_DEPRECATE=1 -Fo.\ . ..\lib\smi.c smi.c ...\lib\smi.c(2600) : error C2065: 'INT_MAX' : undeclared identifier ...\lib\smi.c(2601) : error C2065: 'INT_MIN' : undeclared identifier ...\lib\smi.c(2604) : error C2065: '_I64_MAX' : undeclared identifier ...\lib\smi.c(2605) : error C2065: '_I64_MIN' : undeclared identifier ...\lib\smi.c(2608) : error C2065: 'UINT_MAX' : undeclared identifier ...\lib\smi.c(2612) : error C2065: '_UI64_MAX' : undeclared identifier NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop.
Adding #define HAVE_LIMITS_H to config.h solves that problem.
My build steps: Download SVN Follow the instruction in README.win cd libsmi ## the sources from the CVS archive ./autogen.sh ## generates configure script an runs it cd lib make errormacros.h parser-smi.c parser-sming.c \ scanner-smi.c scanner-sming.c smi.h cd ../tools make dump-svg-script.h Exept I run ./autogen.sh in a cygwin bash shell.
Regards Anders
-----Original Message----- From: Juergen Schoenwaelder [mailto:j.schoenwaelder@jacobs-university.de] Sent: den 27 mars 2008 10:40 To: Anders Broman Cc: libsmi@ibr.cs.tu-bs.de Subject: Re: [libsmi] Compiling with MSVC6
On Thu, Mar 27, 2008 at 08:53:08AM +0100, Anders Broman wrote:
Chacking out tthe latest SVN version I had to manually change in
smi.h:
#ifdef HAVE_LIMITS_H #include "limits.h" #endif to #include "limits.h"
Any ideas why?
I have no clue if "limits.h" generally exists on Win32 compilers. If it does, we could simply define HAVE_LIMITS_H in win/config.h.
/js

On Fri, Mar 28, 2008 at 10:23:15AM +0100, Anders Broman wrote:
Adding #define HAVE_LIMITS_H to config.h solves that problem.
Revision 7968 of win/config.h now defined HAVE_LIMITS_H.
/js

Anders Broman wrote:
Hi, Chacking out tthe latest SVN version I had to manually change in smi.h: #ifdef HAVE_LIMITS_H #include "limits.h" #endif to #include "limits.h"
Any ideas why?
Adding to Juergens comments, MSVC8 has limits.h but does not need it with the SVN version. What is it MSCV6 is missing?
Juergen,
Can you change this bit of win.h back? MSCV8 needs strtof defined too.
Index: win/win.h =================================================================== --- win/win.h (revision 7961) +++ win/win.h (working copy) @@ -77,9 +77,7 @@ */
#if defined(_MSC_VER) -#if _MSC_VER <= 1200 #define strtof(f1,f2) ((float)strtod(f1,f2)) #endif -#endif
#endif /* _WIN_H */
participants (3)
-
Anders Broman
-
Andrew Hood
-
Juergen Schoenwaelder