LINK error 2019 using MKL FFTW and Matlab on 64-bit Windows XP

david.sallngc.com
July 2, 2009 2:09 PM PDT
Rate
 
#2 Reply to #1
Please post a few of the linker error messages with the full and complete text.  My guess is that either you're linking against 32-bit FFTW libraries or you have some interface declarations that explicitly specify the external name and improperly include a leading underscore decoration.

Hi Steve!

After reading your response, I went and looked more closely how I generated the MKL FFTW library, fftw3xf_ms.lib.  I believe that I did indeed create it in 32-bit mode and have corrected that but I still have errors.  This is what I have done,

1) Opened a command window from Visual Studio 2005 and envoked the bat file, vcvarsamd64.bat which set the environmental variables for X64 build.

2) cd c:\program files\Intel\MKL\10.0.5.025\interfaces\fftw3xf

3) Ran the makefile,
    nmake libem64t compiler=ms

This last step generated the file, fftw3xf_ms.lib and put it in the directory, c:\program files\intel\mkl\10.0.5.025\em64t\lib

I then tried to create my mexfunction by invoking the command in the Matlab command window,

> mex foo.f90 'c:\program files\intel\mkl\10.0.5.025\em64t\lib\mkl_em64t.lb' 'c\...\lib\mkl_intel_thread.lib' 'c:\...\lib\mkl_core.lib' 'c:\...\lib\libguide40.lib' 'c:\...\lib\fftw3xf_ms.lib'

Now Im get a lot of link errors such as,

LIBCMT.lib(tidtable.obj) : error LNK2005: _encode_pointer already defined in MSVRCT.lib(MSVCR80.dll)
...
LIBCMT.lib(name1.obj) : error LNK2005: name2 already defined in MSVCRT.lib (name 3)

where name1 = crtheap, fflush, memcpy, ...), name2 = _decode_pointer, _unlock, etc... name3 = MSVCR80.dll, cinitexe.obj, etc...)

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs, use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs, use /NODEFAULTLIB:library
libifcoremd.lib(libifcoremain.obj) : error LNK2019: unresolved external symbol MAIN__ referenced in function main

Am I any closer?!

Thank you very much for your help.

Sincerely,

David

Intel Software Network Forums Statistics

8470 users have contributed to 31601 threads and 100640 posts to date.
In the past 24 hours, we have 31 new thread(s) 110 new posts(s), and 153 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member kopernikus