Close
Instructions to compile SUNDIALS with VC8 - Visual Studio C++ Express 2005
courtesy of Andreas Nicolai
-
extract SUNDIALS archive
-
copy (and optionally edit) the sample
sundials_config.h header file.
-
create subdirectories projects, includes, and libs
copy all include files from the various subdirectories in SUNDIALS into
the includes folder (Windows doesn't have softlinks unfortunately)
-
create the SUNDIALS libraries that you need
here is the general procedure that you have to follow for each library
- start VC
- create new project
Type: Win32 Console Application
Name: libXXX
Place: in directory projects
In New Project Wizard, select application settings page and choose:
- static library
- uncheck "precompiled headers"
- add existings source files to Sources and Headers
(files are in the appropriate SUNDIALS subdirs)
- open project properties and modify settings:
"Configuration properties" - "General"
- change "Output Directory" to ../../libs
"Configuration properties" - "C++" : "Additional Include Directories"
- add appropriate include directories here (see below)
"Configuration properties" - "C++" : "Code generation"
- change "Runtime Library" to "Multi-threaded (/MT)"
(links to the static runtime library)
"Configuration properties" - "C++" : "Preprocessor"
- add "HAVE_CONFIG_H" to "Preprocessor Definitions"
-
specific settings for various libraries
- libNVector:
source to add: nvector_serial.c to Sources and nvector_serial.h to Headers
(files are in subdir 'nvec_ser')
includes: ../..; ../../shared/include
- libCVode:
source to add: all in subdirs cvode/include and cvode/source,
all in subdirs shared/include and shared/source
includes: ../..; ../../shared/include; ../../cvode/include; ../../cvode/source
- for all other solver libs use similar settings as for libCVode
-
linking programs to SUNDIALS libs
- once all libraries have been created, they should be in the libs
subdir while all header files should be copied to includes
- external SUNDIALS users must add the include directory and link to all used
libraries, typically libNVector and one of the solver libs
Close