[¼¼Êõ| ±à³Ì¡¤¿Î¼þ¡¤Linux] [Tech Memo]FFTW and fatal error LNK1104 in Win7

admin ¡¤ ·¢²¼ÓÚ 2013-04-17 13:41 ¡¤ 2202 ´ÎÔĶÁ
1
Topic:
How to solve the problem of  ' fatal error LNK1104 ' when you are generating .lib and .obj files of FFTW in Win7 using following commands.
lib /machine:i386 /def:libfftw3-3.def
lib /machine:i386 /def:libfftw3f-3.def
lib /machine:i386 /def:libfftw3l-3.def


Annoucement:
The inspiration of solving this problem is from http://liuxingguang.blogspot.jp/2012/05/use-fftw-in-c.html by  Lior Ella.
¡ª¡ª¡ªOriginal¡ª¡ª¡ª
Lior Ella said...Hi Antonio and Xingguang,

I ran into the same problem as Antonio, and after messing around with it for about an hour I figured it out. The problem was that I tried to create the *.lib files in the visual studio directory itself. Because admin privileges are required to add files to that directory, it failed.

The solution is to run lib.exe through the visual studio command prompt, but to do it in a "neutral" directory, where the *.def files are found. This will work.

Thanks a lot!
Dec 26, 2012, 5:03:00 AM¡ª¡ª¡ªOriginal¡ª¡ª¡ª

Problem Discription:
When you are using lib.exe in visual studio to generate corresponding .lib and .obj files,  the error is shown as follows.
LINK: fatal error LNK1104: file 'libfftw3-3.lib' can not be opened.

Detailed FFTW configuration introduction:
(English) http://liuxingguang.blogspot.jp/2012/05/use-fftw-in-c.html
(Chinese)WindowsÏÂFFTW¿âµÄ°²×°ÅäÖÃ
http://ruanyuan.net/forum.php?mo ... =2814&fromuid=1

Solution:
As Lior Ella said, the reason for this error is 'Win7 admin privilege'. However, neither Libaray Manager nor Win7 gives the CORRECT debug info. It is easy to be confused here.

To solve this problem is easy, just COPY the files in /Program Files/Microsoft  Visual Studio 9.0/VC/bin to a ¡¯Neutual¡¯ path, i.e. D:/. Then execute the lib command  again  and the  LNK1104 error is gone :)

Anyway, this issue is DISGUSTING:(

RuanYuan.Net@admin
2013.4.17




¹²ÊÕµ½ 5 Ìõ»Ø¸´
ÑÖħ¤¢¤¤ ¡¤ #2 ¡¤ 2013-4-17 23:17:48  »Ø¸´ Ö§³Ö ·´¶Ô
ÓÖÊÇÓ¢Óï¡£¡£¡£¡£±ÉÊÓÓ¢Ó£¡£¡£¡£¡

µãÆÀ

Try to fall in love with English, you may benefit from it  ÏêÇé »Ø¸´ ·¢±íÓÚ 2013-4-18 08:20
admin ¡¤ #3 ¡¤ 2013-4-18 08:20:05  »Ø¸´ Ö§³Ö ·´¶Ô
ÑÖħ¤¢¤¤ ·¢±íÓÚ 2013-4-17 23:17
ÓÖÊÇÓ¢Óï¡£¡£¡£¡£±ÉÊÓÓ¢Ó£¡£¡£¡£¡

Try to fall in love with English, you may benefit from it

µãÆÀ

I¡®m sorry............I can't.................  ÏêÇé »Ø¸´ ·¢±íÓÚ 2013-4-19 17:15
ÑÖħ¤¢¤¤ ¡¤ #4 ¡¤ 2013-4-19 17:15:47  »Ø¸´ Ö§³Ö ·´¶Ô
admin ·¢±íÓÚ 2013-4-18 08:20
Try to fall in love with English, you may benefit from it

I¡®m sorry............I can't.................

µãÆÀ

Ma...... Forget it....  ÏêÇé »Ø¸´ ·¢±íÓÚ 2013-4-19 22:19
admin ¡¤ #5 ¡¤ 2013-4-19 22:19:58  »Ø¸´ Ö§³Ö ·´¶Ô
ÑÖħ¤¢¤¤ ·¢±íÓÚ 2013-4-19 17:15
I¡®m sorry............I can't.................

Ma...... Forget it....

µãÆÀ

Thank you for your forgive.......  ÏêÇé »Ø¸´ ·¢±íÓÚ 2013-4-19 23:18
ÑÖħ¤¢¤¤ ¡¤ #6 ¡¤ 2013-4-19 23:18:20  »Ø¸´ Ö§³Ö ·´¶Ô
admin ·¢±íÓÚ 2013-4-19 22:19
Ma...... Forget it....

Thank you for your forgive.......
»ØÌû
B Color Image Link Quote Code Smilies
Command + Enter
¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí