Problem adding FFTW.dll as reference. [modified]
-
Hi I have downloaded the most recent FFTW dll and want to add it to my project as a reference. When doing this I get a message saying:
A reference to '...\libfftw3-3.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
I then read at fftw.org that the dll cannot be used directly: In order to link to them from Visual C++, you will need to create .lib "import libraries" using the lib.exe program included with VC++. Run: So I've tried to use lib.exe under VS2010 but I don't know how to do this. I went to the command line and put in lib but that was not recoqnized :( Can someone please help me through this - I'm a newbie having a hard time getting used to C#? Update: I just managed to build the VS2010 project for download at FFTW and even the dll + lib file that was made cannot be added as a reference :( :( :( Thanks Tom
modified on Wednesday, September 15, 2010 9:34 PM
-
Hi I have downloaded the most recent FFTW dll and want to add it to my project as a reference. When doing this I get a message saying:
A reference to '...\libfftw3-3.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
I then read at fftw.org that the dll cannot be used directly: In order to link to them from Visual C++, you will need to create .lib "import libraries" using the lib.exe program included with VC++. Run: So I've tried to use lib.exe under VS2010 but I don't know how to do this. I went to the command line and put in lib but that was not recoqnized :( Can someone please help me through this - I'm a newbie having a hard time getting used to C#? Update: I just managed to build the VS2010 project for download at FFTW and even the dll + lib file that was made cannot be added as a reference :( :( :( Thanks Tom
modified on Wednesday, September 15, 2010 9:34 PM
Hi, 1. when you are creating a managed-code project (say an EXE file mainly consisting of C# code), then the only stuff you can "Add a Reference" is more managed code; unmanaged aka native code DLLs can be used through a technology known as P/Invoke; this does not rely on any "reference", Windows will locate those native code libraries just like it always has, by looking for them in a predefined set of folders (see the PATH environment variable). 2. P/Invoke is pretty complex. I'm working on a little article series on the subject, part 1 of it is available here. 3. There is an alternate route, where you would build a managed C++/CLI wrapper to the native code (using another "technology" known as "it just works"). Some are strongly in favor of that route, I'm not, as I'm not very active in C++ and don't want to rely on a third language to connect the two languages I do use most (C# and C). :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
modified on Wednesday, September 15, 2010 10:43 PM
-
Hi, 1. when you are creating a managed-code project (say an EXE file mainly consisting of C# code), then the only stuff you can "Add a Reference" is more managed code; unmanaged aka native code DLLs can be used through a technology known as P/Invoke; this does not rely on any "reference", Windows will locate those native code libraries just like it always has, by looking for them in a predefined set of folders (see the PATH environment variable). 2. P/Invoke is pretty complex. I'm working on a little article series on the subject, part 1 of it is available here. 3. There is an alternate route, where you would build a managed C++/CLI wrapper to the native code (using another "technology" known as "it just works"). Some are strongly in favor of that route, I'm not, as I'm not very active in C++ and don't want to rely on a third language to connect the two languages I do use most (C# and C). :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
modified on Wednesday, September 15, 2010 10:43 PM
Hi Luc Thanks for your support. I managed to get the FFT working as I found a P/invoke FFTW project I could "borrow" from. I appreciate that you spend time writting your reply to me. Will take a look at your article and try get familiar with P/Invoke. Thanks again Tom