- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I use the /Qopenmp compilation option, then at linking time the linker complains about some undefined references on a class destructor of my program. The thing is that without /Qopenmp, it compiles and links fine.
Is this a known bug? I cannot find a simple test case to show you the problem...
I use Visual 2008 with Intel compiler 11.1.065 [IA-32]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check this article to make sure to link with only IntelC's openmp runtime: http://software.intel.com/en-us/articles/how-to-use-intelr-compiler-openmp-compatibility-libraries-on-windows/
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I'm doing that well:
Compiling:
--------------
/c /O2 /Ob2 /I "G:\blabla\include" /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_SECURE_SCL=0" /D "_SECURE_SCL_THROWS=0" /D "_HAS_ITERATOR_DEBUGGING=0" /D "_WIN32" /D "__INTEL_COMPILER" /D "_SCL_SECURE_NO_DEPRECATE" /D "DEBUG" /D "CMAKE_INTDIR="Release"" /D "_WINDLL" /D "_MBCS" /EHsc /MD /GS /fp:fast /Fo"blabla.dir\Release\" /nologo /TP /Zm1000 /Qopenmp -w
--------------
Linking:
--------------
kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.libiphlpapi.lib /OUT:"G:\...blabla.dll" /VERSION:1.0 /INCREMENTAL /nologo /LIBPATH:"G:\....\Release" /MANIFEST /MANIFESTFILE:"blablat.dir\Release\blabla.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"G:\blabla.lib" /DLL DelayImp.lib /subsystem:console
--------------
Notice that even without linking libiomp5md.lib, the error appears. Its the same linking with it:
1>object1.obj : error LNK2001: smbolo externo "public: __thiscall A::~A(void)" (??1A@@QAE@XZ) sin resolver
The A class is not used there (only included on a included file). This destructor is the only symbol unresolved.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have any openmp pragma in the .i file? if not, try to remove /Qopenmp for this one file, it should build ok.
Use "private" if you'd prefer. Or use the Intel Premier Support.
thanks,
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I`ve answered using the private option. It`s OK the file submitted?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the .i file.
There is a bug in the omp compilation. when /Qopenmp is applied, the .obj will have the symbol:
>>dumpbin /symbols n.obj | find /I "?1fest3@@QAE@XZ"
14E1 00000000 UNDEF notype () External | ??1fest3@@QAE@XZ (public: __thi
scall fest3::~fest3(void))
Using /Od /Ob0 doesn't work-around the problem. Well, let me see if the compiler engineer will have a work-around.
thanks,
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I'm awaiting you answer
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the bug is finally fixed the Version 12.0 update 4 and later. There is no fix for the Version 11.1 - sorry. But there is a workaround for older versions.
The work-around: add a
destructor instead of using the default one. The destructor can be empty. It's only important that it is defined explicitly.
Example:
[cpp]class A { public: A() {} ~A() {} }; [/cpp]
Thanks,
Alex

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page