FFTW2 error LNK2020: unresolved token (0A0000C6) fftw_execute
Running ildasm on the resulting dll shows:
.method public static unmanagedexp void
modopt([mscorlib]System.Runtime.CompilerServices.CallConvCdecl)
fftw_execute(valuetype fftw_plan_s*
modopt([Microsoft.VisualC]Microsoft.VisualC.IsConstModifier) p) cil
managed
Other calls to FFTW with similar disassemblies link without complaint.
Commenting my call to fftw_execute causes the program to link. What
might be causing the link failure in this case?
Any ideas would be helpful. I've been working on this for a week and
am totally stumped. Thanks!
--
Brian
An unhandled exception of type 'System.TypeLoadException' occurred in
mymodule.dll
Additional information: Could not load type fftw_plan_s from assembly
MyModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
fftw_plan_s is an internal structure in FFTW. It is not exposed as
part of the public interface, except as a pointer typedef to fftw_plan
which I am using. Do I need to do something to expose this struct to
the unmanaged CLR C++ code?
--
Brian
What version of the compiler are you using? If it is the 2003 / 7.1
version you need to add an empty definition for fftw_plan_s. If you are
using the 2005 / 8.0 version the linker will add that for you (and
generate a warning telling you it did).
The CLR needs to have a definition of a type available even to create a
pointer to it.
Ronald Laeremans
Visual C++ team
Thanks for replying, Ronald. I am using 2003/7.1. I've become pretty
comfortable in my workaround at this point, but if I come across the
problem again I'll give that a shot.
--
Brian