So I'm trying to compile the [toml99](https://github.com/cktan/tomlc99) C library with DMD using ImportC. I first preprocessed the file using `cproc`. The reason I didn't used GCC is because it defines some symbols specific to GCC so it will furthermore mess the compilation process. I created a gist of the file and uploaded [here](https://gist.github.com/rempas/a1633ba4d3fd4f166277d7ff35cedc63) in case someone wants to get the file and try it. The error message I'm getting is the following:

```
toml.c(39): Error: cannot implicitly convert expression `malloc` of type `extern (C) void*(ulong __size)` to `extern (C) void* function(ulong)` toml.c(40): Error: cannot implicitly convert expression `free` of type `extern (C) void(void* __ptr)` to `extern (C) void function(void*)`
```

These two symbols are function pointers but I wasn't able to modify and make it work. Any ideas?

Reply via email to