C Wrapper for C++

前端 未结 4 1309
心在旅途
心在旅途 2020-12-13 15:46

I\'d like to use Pure Data as a prototyping tool for my own library. I found out that Pure Data patches are written in C, but my library is written in C++. So how can I use

4条回答
  •  时光说笑
    2020-12-13 16:42

    You can absolutely call C from C++ - no problemo!

    Worst case, you might have to explicitly declare those functions you call from Pure Data as "extern C". But it's almost certain that Pure Data has already done that for you (you'll probably see "extern C" in the Pure Data header files.

    Here's more info:

    http://msdn.microsoft.com/en-us/library/0603949d%28v=vs.80%29.aspx

    'Hope that helps!

提交回复
热议问题