How to use a C library from D?

前端 未结 2 2072
一个人的身影
一个人的身影 2021-02-12 16:54

Today I heard about the D programming and that it is compatible to C code. Nevertheless I haven\'t found any information on whether it is possible to use C libraries like GTK or

2条回答
  •  旧时难觅i
    2021-02-12 17:44

    D code can be linked with C object files, and can interact with C dlls, but you'll need to generate a D module from the C header file you want to use. The official D website has a guide for doing that very thing.

提交回复
热议问题