Jump to content
NickIlieskou

Problem while trying to build systemc.lib

Recommended Posts

Dear all, 

 

I am new in the systemC world and I am trying to find a way through the set up. I would like to run systemC on Visual Studio 2013 Express. 

 

-Initially I download the systemc2.3.0

-Then I opened the ..\systemc-2.3.0\msvc80\SystemC.vcproj with Microsoft Visual Studio Express 2013

- At that point I got the following message: 

----------------------------------------------------------------

"These projects are either not supported or need project behavior impacting modifications to open in this version of Visual Studio. Projects not displayed either require no changes or will automatically be modified such that behavior is not impacted. For details see: http://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(VS.ReviewProjectAndSolutionChangesDialog.Upgrade)&rd=true

 

One- way upgrade

Visual studio will automatically make functional changes to the following projects in order to open them. You will not be able to open these projects in the version of Visual Studio in which they were originally created. " 

----------------------------------------------------------------

- Then after pressing ok, I build the project and I get 12 Errors and 12 Warnings all stating the same thing: 

Warning C4005:'for': macro redefinition

error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
 
Do anyone know how to solve this bug? I hope I can skip using Visual studio 2005. Thanks in advance!!!
 

Share this post


Link to post
Share on other sites

The following patch fixes this problem in MS Visual Studio 2011 and later:
0001-Check-for-MSVC-version-in-for-scope-bug-hack.patch.txt

 

I don't remember, if this was the only required change for SystemC 2.3.0 to achieve MSVC >= 2011 compatibility.

 

hth,
  Philipp

 

 

 

Share this post


Link to post
Share on other sites

If you don't have the linux 'patch' utility handy, you can apply a patch manually (assuming it is small, which this one is). The file is plain text and tells which files and lines to change. The lines beginning with a '-' are old lines to be replaced with the '+' lines representing replacement/new code. This particular patch says the problem is just after line 69 of the sc_cmnhdr.h file. If you look closely, you will see the fix places a #ifdef around the problematic code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×