Skip to content

A Docker environment for compiling SystemC projects.

License

Notifications You must be signed in to change notification settings

wustudent/DockerCpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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