Jump to content

SystemC in Visual Studio 2012


thoschmi

Recommended Posts

Hi,

I'm trying to install SystemC on Microsoft Visual Studio 2012. I downloaded SystemC 2.3.0

and did the steps in this tutorial:

http://www.ict.kth.se/courses/IL2452/Sept2009/TUTORIAL-SystemC-with-Microsoft-Visual-Studio.pdf

I opened the C++ project in SystemC 2.3.0\...\msvc80 folder and tried to

build it, but i got the following errors:

1>------ Erstellen gestartet: Projekt: SystemC, Konfiguration: Debug Win32 ------

1> sc_list.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_reset.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_main_main.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_main.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_except.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_unsigned.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_signed.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_nbdefs.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_bit.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_signal_resolved_ports.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_signal_resolved.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> sc_port.cpp

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(195): warning C4005: 'for': Makro-Neudefinition

1> c:\users\thomas\downloads\systemc-2.3.0\systemc-2.3.0\src\sysc\kernel\sc_cmnhdr.h(75): Siehe vorherige Definition von 'for'

1>c:\program files (x86)\microsoft visual studio 11.0\vc\include\xkeycheck.h(242): fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.

1> Code wird generiert...

========== Erstellen: 0 erfolgreich, 1 fehlerhaft, 0 aktuell, 0 übersprungen ==========

I hope someone could help me

Regards,

Thomas

Link to comment
Share on other sites

Try:

1. Installed Visual C++ 2012 Express Edition

(Note - won't work on XP only Windows 7/8)

2. Download Systemc-2.3.0.tgz

3. uncompress systemc-2.3.0.tgz

4. Assuming in c:\systemc-2.3.0

5. copy msvc80 to msvc11

(optional, but helps if you attempt to run regressions)

6. Run Visual C++ 2012 EE and open

msvc11\systemc\systemc.sln

7. Upgrade is offered - click OK

8. Menu Build > Build Solution

Build failed due to warning 4005

Edit sc_cmnhdr.h line 75 and add a test for _MSC_VER == 1200 as follows:

// MSVC6.0 for() scope bug

#if defined(_MSC_VER) && (_MSC_VER == 1200)

#define for if( false ); else for

#endif

Now it should build.

9. Add an environment variable

SYSTEMC

set to

c:\systemc-2.3.0\

10. Set library, src, include paths as for Visual C++ 2010

Note: to find the property pages, load in a project (e.g. ex6 from the course).

Then do View > Other Windows > Property Manager

Expand the project name until you find

Debug | Win32 > Microsoft.CPP.Win32.user

and set the include and library directories to

$(SYSTEMC)\src

$(SYSTEMC)\msvc11\systemc\debug

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...