yosri ben salah

systemC on visual studio 2015

5 posts in this topic

hi, i want to install systemC on visual studio 2015, i did all step in this tuto

but when i compile this hello world example

// All systemc modules should include systemc.h header file
#include "systemc.h"
// Hello_world is module name
SC_MODULE (hello_world) {
  SC_CTOR (hello_world) {
    // Nothing in constructor 
  }
  void say_hello() {
    //Print "Hello World" to the console.
    cout << "Hello World.\n";
  }
};

// sc_main in top level function like in C++ main
int sc_main(int argc, char* argv[]) {
  hello_world hello("HELLO");
  // Print the hello world
  hello.say_hello();
  return(0);
}


it displays problem "" not found stdafx.h and namespace std is not a member of gets , i want to ask there a difference between visaul studio version, and how can i solve this problem thanks

Share this post


Link to post
Share on other sites

Remove the include line stafx.h, as far as the differences are considered between Visual Studio and Linux certain header files will be different between them. 

yosri ben salah likes this

Share this post


Link to post
Share on other sites

i remove it but no things was changed, also i turn of precompiled stdafx.h in project properties but i does not resolve the problem, it displays std is not a member gets

Share this post


Link to post
Share on other sites

Try using the current public review release of SystemC 2.3.2 (see the following announcement):

This version has been tested successfully on Visual Studio 2015.

Hope that helps,
 Philipp

 

Share this post


Link to post
Share on other sites

I think the issue is related to visual studio project settings. When the new project is created you have to select Empty project (with precompiled header as disabled). Check if you are doing the same (video time 2:01).

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