- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want my app not to depend on libmmd.dll, especially since the only functions that it is depending on it for at the moment are sin, cos, and pow.
Following advice I saw elsewhere on this forum, I tried adding /NODEFAULTLIB:libmmd.lib to my Visual Studio project's linker options.
That results in unresolved external symbols for sin/cos and pow, however:
2>ipo_85526obj.obj : error LNK2019: unresolved external symbol ___libm_sse2_sincos referenced in function _cmath_rect 2>ipo_85526obj.obj : error LNK2019: unresolved external symbol _pow.J referenced in function _math_pow
Is there some other way I can compile my app with icl, but have it not depend on libmmd?
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you do not want to distribute the dynamic DLL, you should link with the static lib "libmmt.lib".
Jennifer
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Jennifer Jiang (Intel)
If you do not want to distribute the dynamic DLL, you should link with the static lib "libmmt.lib".
Jennifer
Jennifer
We did end up linking statically against libmmt.lib. Unfortunately our executable size increased by 500kb, which seems way too much, considering the only 3 or so functions that were being linked to dynamically.
What I'm really looking for is a way to pull those math functions above (sin, cos, pow) not from Intel's intrinsics libraries, but from the MSVC CRT, like cl.exe would do normally. No new dependency, no massive code size increase. I played around with options related to this (use intrinsics, etc) but couldn't get this to work. Is there a way to accomplish this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having the same problems as the OP about unresolved symbols when avoiding linking against libmmd.dll. I do not mind about redistributing the DLL or linking statically, but it is causing problems with some of our customers who are trying to run our software in AMD Sempron and Athlon XP CPUs. The problem is caused by libmmd.dll executing an illegal instruction on those CPUs. Is there anything I can do about it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - binksoftware
I am having the same problems as the OP about unresolved symbols when avoiding linking against libmmd.dll. I do not mind about redistributing the DLL or linking statically, but it is causing problems with some of our customers who are trying to run our software in AMD Sempron and Athlon XP CPUs. The problem is caused by libmmd.dll executing an illegal instruction on those CPUs. Is there anything I can do about it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
Just to satisfy curiosity: are those CPUs reporting they support SSE2 but failing SSE2 instructions, or does the library pick SSE3 instructions? This might be further reason to request a math library which complies with the instruction set specified in the compilation.
I got an old PC to run the test, and the CPU (AMD Athlon XP 3200+) supports up to SSE. According to WinDbg the offending instruction is a movsd xmm0,
After changing some of the settings in the project I was able to compile and link the program without it trying to use libmmd. The program does not crash in the test PC anymore, but it does not make use of any newer instructions if available either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - binksoftware
I got an old PC to run the test, and the CPU (AMD Athlon XP 3200+) supports up to SSE. According to WinDbg the offending instruction is a movsd xmm0,
After changing some of the settings in the project I was able to compile and link the program without it trying to use libmmd. The program does not crash in the test PC anymore, but it does not make use of any newer instructions if available either.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page