You are on page 1of 11

SystemC with Microsoft Visual Studio 2005 and 2008

Author: Mihai Fonoage Edited by Aleksander Colic and Charles Norona. 1. First Microsoft Visual Studio 2005 or 2008 needs to be downloaded from http://brwcse.fau.edu/MSDNAA/index.html . 2. Go to www.systemc.org and create a new user account in order to download the SystemC Library. 3. On the SystemC website, go under Downloads->OSCI Standards, scroll down to Current Releases section and download SystemC 2.2.0 (systemc-2.2.0.tgz). 4. Open Microsoft Visual Studio 2005/2008:

Open the SystemC project that comes 2.2.0\msvc71\SystemC\SystemC.vcproj):

with

the

release

(\systemc-

Visual Studios Conversion Wizard should pop up. Follow the directions of the wizard, a back-up of the project is not necessary.

The output should look like this (make sure you have the Solution Explorer view opened View Solution Explorer):

5. Build the systemc project using F6. This should create the SystemC.lib file under \systemc-2.2.0\msvc71\SystemC\Debug\. Warning messages will appear in the output panel while the project is being compiled; these messages specify that some methods used are deprecated. This will not hinder the creation of the SystemC library. The output should be similar to the next figure:

NOTE: If you get errors during the compilation of SystemC, i.e. missing header files, or missing libraries, one has to have the Platform SDK installed. All the information needed can be found at http://msdn2.microsoft.com/en-us/express/aa700755.aspx (to compile SystemC and to make the SISC example work, I only followed Step1 through Step3 from that webpage).

All of the previous steps including step six should be done only once. The changes will be applied for any project you will create (same as in the Visual C++ 2005 Express version). 6. Include SystemCs source directory into Tools Options Projects and Solutions VC++ Directories, and in the right panel, under Show directories for: choose Include files and add the src directory of the systemc release (in my case it was \systemc-2.2.0\src):

Then, choose Library files also under Show directories for: and add the Debug dir (in my case it was \systemc-2.2.0\msvc71\SystemC\Debug\):

7. Create a new empty Project by going into File New Project Choose Win32 Console Application (be sure to check the Empty Project box in the next steps). Enter a name and choose your location:

8. Right-click on the Source Files folder and go to Add New Item (if you already have source and header files, you can just drag-and-drop them into the Source Files and Header Files folders or use the Existing Item option to browse for them):

9. If you have to start from scratch go ahead and create a source code file for your project:

10. Make sure you run the project using the standard windows libraries:

11. Go into "Project Properties Configuration Properties Debugging" and in the left panel, add SC_SIGNAL_WRITE_CHECK=DISABLE in the Environment section:

12. Make sure that the option to detect 64-bit compatibility issues is set to NO:

13. Right-click on project name, then go to Properties Configuration Properties C/C++ Code Generation and in the right panel. Change the value of Runtime Library to Multi-threaded Debug (/MTd):

14. Include the /vmg option to your C/C++ compiler as an extra command line:

15. Right-click on project name, then go to Properties Configuration Properties Linker Input and in the right panel, add to Additional Dependencies the SystemC Library you created, namely systemc.lib

16. For building the project, use F6 and then run it using CTRL + F5.

You might also like