如何让 FFTW 在 Windows XP 上的 Eclipse CDT 中工作
我正在努力让西方最快的傅立叶变换与eclipse配合。我从网站上下载了它(这是一个名为 fftw-3.2.2 的大文件夹,其中包含其他名称为 api、dft、cell、doc、kernel、fdft 等的文件夹,每个文件夹都包含 .h 和 .c 文件)。
我尝试转到项目>属性>MinGW C链接器>库>库搜索路径(-L)并添加文件夹fftw-3.2.2。我尝试将 #include 或 #include 放在代码顶部。
我可以输入像 'fftw_plan p ;' 这样的行这很好,但是每当我尝试使用傅立叶变换函数之一时,例如“fftw_execute(p);” ,它给我消息“未定义对 fftw_ececute 的引用”。该项目拒绝构建和运行,我陷入困境。
我环顾过这里和其他地方,一切都在告诉我有关 libX.a 文件的信息,但 fftw-3.2.2 不包含任何带有 .a 扩展名的文件。我怎样才能让 eclipse 与 fftw 一起工作?我正在使用 mingw 编译器在 Windows XP 机器上运行 Eclipse Ganymede 3.4.1。
I'm trying to get the Fastest Fourier Transform in the West to cooperate with eclipse. I downloaded it from the website (it's a big folder called fftw-3.2.2 filled with other folders with names api, dft, cell, doc, kernel, fdft and more, each filled with .h and .c files).
I've tried going to project>Properties>MinGW C linker>Libraries>Library Search Path (-L) and adding the folder fftw-3.2.2. I try to put #include or #include at the top of my code.
I can put in a line like 'fftw_plan p ;' and it's fine with it, but whenever I try to use one of the fourier transform functions, like 'fftw_execute(p);' , it gives me the message 'undefined reference to fftw_ececute'. the project refuses to build and run, and i'm stuck.
I've looked around here and other places, and everything keeps telling me about libX.a files, but the fftw-3.2.2 doesn't contain any files with the .a extension. How can I get eclipse to work with fftw? I am running eclipse ganymede 3.4.1 on a windows xp machine with the mingw compiler.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否下载了此处链接的二进制文件?
假设您这样做了,那么在编译时,您需要链接到提供的库。它们可能具有
.dll
扩展名,并且可以在lib
或bin
目录或类似目录中找到。您可能需要检查您下载的文件是否有一个自述文件来告诉您如何使用它。要链接库,您首先需要将该路径指定为链接器路径,这听起来像是您已经完成的,然后需要将您正在使用的特定库添加到链接库列表中。 这是取自 此页面显示了这是如何完成的。基本上,您可以转到项目属性,然后找到“C/C++ Build”部分,然后在“工具设置”选项卡上添加库文件的名称(不带扩展名)。编译器将在库搜索路径中搜索这些库(不是递归地)。
Did you download the binaries linked here?
Assuming you did, when you compile, you need to link against the libraries that are provided. These probably have a
.dll
extension, and may be found in alib
orbin
directory, or similar. You might want to check if the file you download has a readme that tells you how to use it.To link against the libraries, you first need to specify that path as the linker path, which it sounds like you've done already, and then you need to add the specific libraries you're using to the list of link libraries. Here is a screenshot taken from this page that shows how this is done. Basically, you go to the project properties, then find the "C/C++ Build" section, then on the "Tool Settings" tab, you add the names of the library files, WITHOUT the extension. The compiler will search the Library search paths for those libraries (not recursively).