> For the complete documentation index, see [llms.txt](https://devs.truebit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs.truebit.io/developing-truebit-tasks/how-to-create-function-tasks/supported-languages/c-c++.md).

# C/C++

## **Task Preparation**

### Source Code Structure

In order to compile your source code, make sure you have the following file structure within the `❮sourceCodePath❯` folder that will be built.

📁 src \
└─ 📄 main.c\
📄 compile.sh

### Compile&#x20;

You will need to create a `compile.sh` file to build your code and place all the required libraries your project needs.

#### Compile.sh example

{% code overflow="wrap" %}

```bash
#!/bin/sh
${WASI_SDK_PATH}/bin/clang --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot src/main.c -g -o task.wasm "-Wl,--stack-first,-zstack-size=1048576"
```

{% endcode %}
