
I am trying to get everything to compile using Visual C++. Has anyone been successful and can you tell me what you had to do?
K.C.

Hi K.C.,
Read the win/readme file it explains how to build libsmi with msvc. The current win/makefile is currently broken (I will take the time to fix it and submit a patch).
You can use the win/GNUMakefile with gmake (gnu make). It works ok. For this you should get gmake.exe for w32 platforms.
Regards,
K.C. Norseth kcn@norseth.com wrote:
This is a multi-part message in MIME format.
------=_NextPart_000_0049_01C18BFB.C387E5C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am trying to get everything to compile using Visual C++. Has anyone = been successful and can you tell me what you had to do?
K.C.
------=_NextPart_000_0049_01C18BFB.C387E5C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>I am trying to get everything to = compile using=20 Visual C++. Has anyone been successful and can you tell me what = you had to=20 do?</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>K.C.</FONT></DIV> <DIV> </DIV></BODY></HTML>
------=_NextPart_000_0049_01C18BFB.C387E5C0--
-- !! 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.

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.
participants (3)
-
Erik Schoenfelder
-
K.C. Norseth
-
Yigal Hochberg