Building ng-spice with Microsoft Visual C++ for Windows
I finally got the source code to ng-spice v13, and I've been working to
build it in Microsoft Visual C++ / Developer Studio.
I was wondering if anyone else has worked on this already, or if anyone else
is interested.
I'll be happy to share the changes I'm making to source code, the project
file, and whatever else is needed with those who want it when I'm done. So
speak up if you're interested.
For those of you unfamiliar with Microsoft Developer Studio and MS Visual
C++, it doesn't use the makefile paradigm. Instead, it uses a project tree
with the source and header files showing up in the tree view, and then it
simply goes through the source files and builds them. You can put the
project into a hierarchical project tree, but I haven't played around with
that option.
So the first challenge is figuring out which files are actually compiled for
the executable. I chose to use a flat project tree, for now. I don't know
how I would go about linking in separate devices... I imagine that I would
use something like dynamic link libraries for the specific devices. For
now, I'm including all of the devices in the project tree.
The other challenges so far tedious but nothing overwhelming. For example,
the #include paths are a problem for Visual C++. I was originally trying to
add extra paths to the list of include directories, but I gave up on many of
them so instead I changed many the #include pathnames, especially for those
in the spicelib branch.
By the way, what's going on with the following lines that show up in all of
the device xxxInit.c files? Visual C++ can't handle them. Are they
standard C syntax, or do I need to use some special compiler option.
DEVparam : VSRCparam,
DEVmodParam : NULL,
DEVload : VSRCload,...
For now, I'm changing this to:
VSRCparam,
NULL,
VSRCload
Because I don't know what purpose the other syntax serves.
In case you guys are wondering why anyone would want to use Microsoft Visual
C++... For one, it's the system I do nearly all of my development work in,
so I'm comfortable with it. Also, it has a very nice development
environment and a very good debugger. Also, it can tie in directly with
Visual SourceSafe... I guess you've guessed by now that I don't use CVS.
Jon Engelbert
President, Beige Bag Software
279 E. Liberty, Ann Arbor, MI 48105
jon@beigebag.com
Partial thread listing: