berndporr / iir1

DSP IIR realtime filter library written in C++
http://berndporr.github.io/iir1/
MIT License
627 stars 137 forks source link

Having including the path of folder iir and Iir.h in VS code but the terminal still goes wrong #43

Closed HongyuanChen closed 2 years ago

HongyuanChen commented 2 years ago

Sorry to interrupt everybody. I have installed the package and want to use it in vs code (Ubuntu 18.04).

I have add the include path in c_cpp_properties.json ( both the iir folder and the path including the Iir.h) ,When debugging , the terminal went wrong with : /tmp/ccb3wt3i.o:在函数‘Iir::Butterworth::LowPass<2, Iir::DirectFormII>::setup(double, double)’中: /usr/include/iir/Butterworth.h:156:对‘Iir::Butterworth::LowPassBase::setup(int, double)’未定义的引用 collect2: error: ld returned 1 exit status

the terminal in chinese(未定义的引用) could be translated to ( undefined reference)。

When I search how to fix it , Some tell me that I should include the .cpp about the iir in task.json .But I can't find them.

HongyuanChen commented 2 years ago

I have added the path of libiir.so in task.json still went wrong, So sad . How can I fix this problem?

// See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "build", // 任务名称,与launch.json的preLaunchTask相对应 "type": "shell", // 可以为shell或process,前者相当于先打开shell再输入命令,后者是直接运行命令 "command": "g++", // 要使用的编译器, C就写gcc "args": [ "-g", "${file}", "-std=c++11", "-o", "${fileBasenameNoExtension}.out", "-L/usr/lib/x86_64-linux-gnu", "-liir" ] } ]

berndporr commented 2 years ago

Sorry I don't give support of how to use an IDE. Best of luck.