how to use and install SystemC in terminal mac OS X?

前端 未结 3 795
清酒与你
清酒与你 2020-12-17 06:49

how to use and install SystemC in terminal mac OS X?
I tried the Logic poet application, But i use os x 10.10 so it doesn\'t work.
so i want to know

3条回答
  •  天涯浪人
    2020-12-17 07:44

    Ensure you have xcode command line tools installed.

    Follow instructions provided in the official repository.


    From personal experience.

    Compiling SystemC library with clang results in segmentation fault: 11 error every time I include systemc library into my code. To avoid this use gcc instead.

    Note that I use gcc-8, installed with homebrew.

    $ cd path/to/systemc-2.3.3
    $ mkdir objdir
    $ cd objdir
    $ export CXX=g++-8
    $ ../configure
    $ make
    $ make install
    

    Use $ make check to launch examples compilation and unit tests.

    To compile and run hello world example:

    $ export SYSTEMC_HOME=path/to/systemc-2.3.3
    $ g++-8 hello.cpp -o hello.o -L $SYSTEMC_HOME/lib-macosx64 -I $SYSTEMC_HOME/include/ -l systemc
    $ ./hello.o
    

    Tested on macOS 10.13.6; gcc version 8.2.0; systemc-2.3.3

提交回复
热议问题