Вы находитесь на странице: 1из 2

SystemC 2.1 目前能在 Visual Studio .

NET 2003 的环境下开发,移植到 Visual Studio 2005 之


后会出现一些小问题。经研究,我们需要改动一些参数。

--------------------------------------------------------------------------------------------------------------------
步骤一:编译 SystemC 库
--------------------------------------------------------------------------------------------------------------------

1.下载SystemC library source code


到http://www.systemc.org注册会员账号后,即可下载SystemC library soure code

2.以下 SystemC 2.1 v1 为例,下载的文件名为 systemc-2.1.v1.tgz,解压缩到 c:\systemc-


2.1.v1 下

3.使用 Visual Studio 2005 打开 C:\systemc-2.1.v1\msvc71\SystemC\SystemC.sln,会提示转换


版本,点击 OK。

4.将 Compile mode 调到 Debug


Build -> Compilation Manager...
将 Active Solution Configuration 改成 Debug
(虽然可调成 Release mode 做 compile,但开发 AP 时,若将 library path 指向 Release 目录,
将无法执行 Simulation,原因不明。)

5.编译 Library
Build -> Build Solution
(项目属性中 c/c++ -> 高级,可以设置禁用 4996 警告)
SystemC.lib 将产生在 c:\systemc-2.1.v1\msvc71\SystemC\Debug 下

--------------------------------------------------------------------------------------------------------------------
步骤二:更新 SystemC include file 和 library
--------------------------------------------------------------------------------------------------------------------

1. Select Tools -> Options . . . and the Projects -> VC++ Directories tab

2. Select show directories for: Library files

3. Select the 'New' icon and browse to: c:\systemc-2.1.v1\msvc71\systemc\debug

4. Select show directories for: Include files

5. Select the 'New' icon and browse to: c:\systemc-2.1.v1\src

--------------------------------------------------------------------------------------------------------------------
步骤三:创建 SystemC 应用程序
--------------------------------------------------------------------------------------------------------------------

1. Start Visual Studio. From the Start Page select New Project and Win32 Console Project. Type
the project name and select a suitable location then click OK.
2. Select the Application Settings page of the Win32 Application Wizard and make sure the
'Empty project' box is ticked. Click 'Finish' to complete the wizard.

3. Add new/existing C++ files to the project and edit code.

4. Display the project Property Pages by selecting 'Properties...' from the Project menu.

5. C/C++ -> General properties


Warning level= Level 1(/W1)

6. C/C++ -> Code Generation


Runtime Library =Multi-thread Debug (/MTd)

7. C/C++ -> Command Line properties


Additional Options = /vmg /D_CRT_SECURE_NO_DEPRECATE

8. Linker -> Input properties


Additional Dependiences = systemc.lib

9. Click OK

Вам также может понравиться