David Peng
David Peng

Reputation: 307

SystemC on MAC m1 with Vscode: Undefined symbols for architecture arm64

I am building systemC environment in Mac m1. I finished the whole process of systemC build and check and installation. All example cases passed in command line.

However, when I tried to integrate the env into vscode per https://github.com/fmuller-pns/systemc-vscode-project-template. It will generate error like:

 *  Executing task: bash -c 'make all' 

g++  -L/Users/davidpeng/systemc/systemc/lib-macosxarm -lsystemc  -o build/main build/src/main.o
Undefined symbols for architecture arm64:
  "sc_core::sc_api_version_2_3_4_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_4_cxx199711L(sc_core::sc_writer_policy, bool)", referenced from:
      ___cxx_global_var_init in main.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/main] Error 1

Any idea? please help.

Upvotes: -1

Views: 341

Answers (1)

David Peng
David Peng

Reputation: 307

It turns out I don't specify c++ std version in makefile. After I use the same version as systemc compilation. It passes.

Upvotes: 1

Related Questions