
Hi,
K.C.> I am trying to get everything to compile using Visual C++. Has anyone = K.C.> been successful and can you tell me what you had to do?
well, this does not work out-of-the-box, but it's not too hard to get it working.
basically there are some files missing, usually created by configure (eg. smi.h) and some by running flex, bison amd some magic stuff at compile time (eg. scanner-smi.c or errormacros.h).
finally dump-scli.c expects a regex.h which simply is not avail with vc++.
what can you do:
an easy way is to configure and to make libsmi under a similar platform and use the build files to create the vc compiled stuff.
i used linux to configure and make all the missing stuff (with the source from the current cvs archive). then i created a minimal regex.h and updated the makefile for vc++ (adding dump-xsd.obj and tubs-mibs). finally a nmake install worked fine.
the diff for the makefile and regex.h is appended.
so it is not too hard to build a win32 binary with vc, if you have another os avail (cygwin or so should work too).
if you cannot (or if you do not want to) go this way, i put some stuff together at URL:http://www.gaertner.de/~schoenfr/libsmi/ to help getting libsmi to compile under vc++.
i hope this helps to step on.
have fun, Erik
diff -u -d -N libsmi-cvs/win/makefile libsmi/win/makefile --- libsmi-cvs/win/makefile Mon Aug 27 15:08:53 2001 +++ libsmi/win/makefile Tue Dec 25 22:51:55 2001 @@ -23,7 +23,7 @@ ROOT = ... TMPDIR = . #TOOLS32 = C:\MSDEV -TOOLS32 = C:\PROGRA~1\MICROS~2\VC98 +TOOLS32 = C:\VC98
## ## Installation paths: @@ -97,7 +97,8 @@ $(TMPDIR)\dump-identifiers.obj \ $(TMPDIR)\dump-python.obj \ $(TMPDIR)\dump-perl.obj \ - $(TMPDIR)\dump-scli.obj + $(TMPDIR)\dump-scli.obj \ + $(TMPDIR)\dump-xsd.obj
SMILIB = smi.lib
@@ -184,6 +185,8 @@ $(CP) ..\mibs\ietf*.* $(MIBDIR)\ietf $(MKDIR) $(MIBDIR)\irtf $(CP) ..\mibs\irtf*.* $(MIBDIR)\irtf + $(MKDIR) $(MIBDIR)\tubs + $(CP) ..\mibs\tubs*.* $(MIBDIR)\tubs $(MKDIR) $(MIBDIR)\site
diff -u -d -N libsmi-cvs/win/regex.h libsmi/win/regex.h --- libsmi-cvs/win/regex.h Thu Jan 1 01:00:00 1970 +++ libsmi/win/regex.h Tue Dec 25 22:54:05 2001 @@ -0,0 +1,17 @@ +/* + * regex.h: Dec 2001 + * + * the ../tools/dump-scli.c module expects some regular expression + * routines, which are not avail under VC++ (at least not with version + * 6.0). + * + * so we provide some dummy defines allowing a working module, as long + * as no regular expression support is needed. + */ + +#define regex_t int + +#define regcomp(a, b, c) 1 /* error value */ +#define regexec(a, b, c, d, e) 0 +#define regerror(a,b,c,d) strncpy(c, "regex not supported", d) +#define regfree(a) -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.