Cannot install canisters using CLang

I have tried all examples using c language and non of them worked
I am using dfx 0.6.10 also I tried it with 0.6.14 same problem appear
Also the tutorial and github repo steps are not same for the same project reverse confusing.


Are you following this tutorial? https://sdk.dfinity.org/docs/developers-guide/work-with-languages.html#_using_c

If you’ve compiled the program into WebAssembly successfully, then the problem might be with the dfx.json in this step: https://sdk.dfinity.org/docs/developers-guide/work-with-languages.html#_create_a_minimal_configuration_file .

Try the following in your dfx.json file instead:

{
    "canisters": {
        "reverse": {
            "main": "reverse",
            "candid": "build/reverse/reverse.did",
            "type": "custom",
            "wasm": "build/reverse/reverse.wasm"
        }
    },
    "dfx": "0.6.14",
    "networks": {
        "local": {
            "bind": "127.0.0.1:8080",
            "type": "ephemeral"
        }
    }
}

(@lsgunn)

2 Likes

If you are looking for a good example for C, then I would highly recommend that you checkout this example.

3 Likes

Thanks a million all yes I was missing .did and .wasm paths.
it runs

2 Likes