我成功編譯了一個64位版本的fftw 3.3.4庫作爲靜態庫,源代碼和Visual Studio解決方案來自「fftw-3.3-libs-visual-studio -2010.zip」。 現在我嘗試鏈接到我使用fftw的項目中的靜態庫。 在建築/鏈接我得到LNK2001錯誤fftw Visual Studio 2010編譯靜態庫LNK2001錯誤__imp_fftwf
Fehler 30 error LNK2001: Nicht aufgelöstes externes Symbol "__imp_fftwf_malloc"
Sry基因,我有一個德國的Visual Studio安裝。基本上它說有一個名爲「__imp_fftwf_malloc」的未解析符號。我得到這個錯誤,我打電話給所有的fftw函數,並且在函數名稱前面總是有這個「__imp_」。
我已經鏈接到庫和/ verbose:lib顯示我庫成功搜索。 有沒有人有任何線索的問題可能是?
EDIT1: 我在你創建的庫上做了一個dumpbin,並複製了fftw_malloc被提到的所有條目,也許這可以幫助你嗎?
public symbol
A57BF4 fftwf_malloc
25B fftwf_malloc
Linker Directives
-----------------
/DEFAULTLIB:"libcpmtd"
/DEFAULTLIB:"LIBCMTD"
/DEFAULTLIB:"OLDNAMES"
/DEFAULTLIB:"VCOMPD"
/EXPORT:fftwf_malloc
/EXPORT:fftwf_free
/EXPORT:fftwf_alloc_real
/EXPORT:fftwf_alloc_complex
RELOCATIONS #2
Symbol Symbol
Offset Type Applied To Index Name
-------- ---------------- ----------------- -------- ------
00000570 SECREL 00000000 7 fftwf_malloc
00000574 SECTION 0000 7 fftwf_malloc
000005C0 SECREL 00000000 7 fftwf_malloc
000005C4 SECTION 0000 7 fftwf_malloc
RELOCATIONS #3
Symbol Symbol
Offset Type Applied To Index Name
-------- ---------------- ----------------- -------- ------
00000024 REL32 00000000 E fftwf_kernel_malloc
00000064 REL32 00000000 1B fftwf_kernel_free
000000AB REL32 00000000 7 fftwf_malloc
000000EB REL32 00000000 7 fftwf_malloc
COFF SYMBOL TABLE
000 00AA766F ABS notype Static | @comp.id
001 00000000 SECT1 notype Static | .drectve
Section length B9, #relocs 0, #linenums 0, checksum 0
003 00000000 SECT2 notype Static | .debug$S
Section length 1194, #relocs 10, #linenums 0, checksum 0
005 00000000 SECT3 notype Static | .text
Section length F5, #relocs 4, #linenums 0, checksum 50F0AACD
007 00000000 SECT3 notype() External | fftwf_malloc
008 00000000 SECT4 notype Static | .pdata
Section length 30, #relocs C, #linenums 0, checksum BFE4C30B
00A 00000000 SECT4 notype Static | $pdata$fftwf_malloc
00B 00000000 SECT5 notype Static | .xdata
你確定你正在鏈接單精度庫('fftwf')而不是雙精度('fftw')嗎? –
我嘗試了所有組合,只是單精度,雙精度和兩個庫一起。 –