I've built a program that uses mkl and ipp that runs on mac and linux. I'm now building that program for Windows using cygwin and gcc, and can't get it to link.
The errors I'm getting are:
Warning: .drectve `-defaultlib:"uuid.lib" ' unrecognized../../../bin/libMath.a(VectorUtility.cxx.o):VectorUtility.cxx:(.text+0x95): undefined reference to `_ippGetLibVersion'../../../bin/libMath.a(VectorUtility.cxx.o):VectorUtility.cxx:(.text+0x157): undefined reference to `_ippsWinHann_32f_I'
(and many more like that).
I'm using link path:
and linking to the following:
Can someone point me to what I'm doing wrong?
GCC and Windows lib use different call convention for lib name. If you use 'nm' command line, you can find:
> nm myobj.o
In IPP, the entry poist are:
that is why the link can not find the symbols.
There is some discussion at cywin site on how use Windows lib with GCC:
on "How do I link against a .lib file" section:
Following some hints there, the followings steps looks to work for me now.
1) Build a custom DLL with IPP static libraries. You can use IPP sample code (ipp-samples\advanced-usage\linkage\customdll),
add the functions you used into .def file: into customdll\src\export.def
build the sample code, it created the DLL file: Bin\win32-xx\usr.dll
2) In cgwin, use the DLL tool to create a .a lib:
dlltool --def export.def --dllname usr.dll --output-lib myipplib.a
3) link 'myipplib.a' with you application.
Those instructions helped. However, now I get runtime errors. It looks like the stack pointer is being modified during a call to, e.g.ippsConv_32f, which causes crashes due to bad memory access. It's possible to hack around this by saving the stack pointer before the call to ippsConv_32f, and restoring it afterwards, but I think there must be something else going on?
Any help would be much appreciated,