Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.25 KB

File metadata and controls

38 lines (28 loc) · 1.25 KB

Compile SystemC Project in Docker

1. Install docker and docker-compose

Follow these steps to install and start docker:
Docker for Windows
Docker for MacOS

If you have problem with firewall on windows, install Docker Toolbox instead
Docker Toolbox for Windows
Docker Toolbox for MacOS

2. Download this repo into your computer and open Powershell(in Windows) or Terminal(in MacOS)

Use following command to enter the folder:

cd DockerCpp

3. Start the compile environment

then run following commands to start the compile environment:

docker-compose build
docker-compose run --rm dockercpp

4. Compile your project

After # appears in the terminal, you can use following commands to build and run your project:

cd Proj
cmake -DCMAKE_CXX_STANDARD=11 -DCMAKE_BUILD_TYPE=Debug && cmake --build .
./main

To quit the terminal, use exit command.

You can put your own project in the Proj folder, don't forget to write a CMakeLists.txt and a Makefile