Trying to include a library, but keep getting 'undefined reference to' messages

前端 未结 3 2239
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 07:18

I am attempting to use the libtommath library. I\'m using the NetBeans IDE for my project on Ubuntu linux. I have downloaded and built the library, I have done a \'make inst

3条回答
  •  Happy的楠姐
    2020-12-02 07:24

    If the .c source files are converted .cpp (like as in parsec), then the extern needs to be followed by "C" as in

    extern "C" void foo();
    

提交回复
热议问题