unresolved external symbol __iob referenced in function _write_message

unresolved external symbol __iob referenced in function _write_message

Hi, All,

I am trying to build my first IVC application with the parallel studio, and got this error:

libmmt.lib(libm_error.obj) : error LNK2019: unresolved external symbol __iob referenced in function _write_message

What is this libmmt.lib? Multi-threaded math library?

This is the debug build with all sub project using /MTd. Anybody has similar experience to share? Thanks in advance.

The detailed linker line goes like:

wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ippcorel.lib ippsemerged.lib ippsmerged.lib ippvmemerged.lib ippvmmerged.lib /OUT:"C:\build\v700\Debug/GTsuiteC.exe" /INCREMENTAL /nologo /LIBPATH:"C:\Program Files\Intel\Composer\2009\ipp\ia32\lib" /MANIFEST /MANIFESTFILE:"Debug\GTsuiteC.exe.intermediate.manifest" /NODEFAULTLIB:"LIBCMTD" /NODEFAULTLIB:"LIBCMT" /TLBID:1 /DEBUG /PDB:"C:\build\v700\Debug\GTsuiteC.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\build\v700\Debug\GTsuiteC.lib" /MACHINE:X86
C:\build\v700\g\lib\Debug\gtmaindpd.lib
... ...

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,
Yes, libmmt is the multi-threaded static math library of the Intel Compiler. Could you please check Project Properties -> C/C++ > Code generation. and select Runtime library as: Multi-threaded Debug(/MDd), instead of "Multi-threaded Debug DLL" (/MTd),as you are using libmmt.lib which looks likeisthe static version of Math library and not the Dll. If that's the case, the linker needs to know about the same. BTW, the math library linked to an application depends on the compilation or linkage options specified:
Library Option Description
libm.lib Default static math library.
libmmt.lib /MT Multi-threaded static math library.
libmmd.lib /MD Dynamically linked math library.
libmmdd.lib /MDd Dynamically linked debug math library.
libmmds.lib Static version compiled with /MD option.

Let me know if the above resolves the problem, appreciate much.

-regards,
Kittur

elhefe38's picture

Quoting - a.zhaogtisoft.com
Hi, All,

I am trying to build my first IVC application with the parallel studio, and got this error:

libmmt.lib(libm_error.obj) : error LNK2019: unresolved external symbol __iob referenced in function _write_message

What is this libmmt.lib? Multi-threaded math library?

This is the debug build with all sub project using /MTd. Anybody has similar experience to share? Thanks in advance.

The detailed linker line goes like:

wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ippcorel.lib ippsemerged.lib ippsmerged.lib ippvmemerged.lib ippvmmerged.lib /OUT:"C:buildv700Debug/GTsuiteC.exe" /INCREMENTAL /nologo /LIBPATH:"C:Program FilesIntelComposer2009ippia32lib" /MANIFEST /MANIFESTFILE:"DebugGTsuiteC.exe.intermediate.manifest" /NODEFAULTLIB:"LIBCMTD" /NODEFAULTLIB:"LIBCMT" /TLBID:1 /DEBUG /PDB:"C:buildv700DebugGTsuiteC.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"C:buildv700DebugGTsuiteC.lib" /MACHINE:X86
C:buildv700glibDebuggtmaindpd.lib
... ...

I ran into the same issue (although in a different context). After trying MANY things, I found out that adding the following code (e.g. in a header) might be helpful:

extern "C" { FILE _iob[3] = {__iob_func()[0], __iob_func()[1], __iob_func()[2]}; }

elhefe38's picture

Quoting - elhefe38

I ran into the same issue (although in a different context). After trying MANY things, I found out that adding the following code (e.g. in a header) might be helpful:

extern "C" { FILE _iob[3] = {__iob_func()[0], __iob_func()[1], __iob_func()[2]}; }

Just to be complete you can find a discussion on this topic here

regards

Just resolve the issue with Intel support. Here is part of the discussion:

-------------------------------------------------------------------
Anyway, if I remove "libcmtd;libcmt" from "no defaultlib", I will get way too many conflict symbols. But if I just add MSVCRTD.lib in the "no defaultlib", I only get a lot of warnings, but the _iob error is gone, it is something like following:

libnagware.lib(libfile.obj) : warning LNK4049: locally defined symbol ___iob_func imported
libnagware.lib(libstring.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function ___NAGf90_vec_ch_asgn_array_ch
libnagware.lib(liberror.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function ___NAGf90_already_allocated
libnagware.lib(libinit.obj) : warning LNK4049: locally defined symbol ___iob_func imported
libnagware.lib(libutil.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function _formatV

I guess these warnings should not hurt.
--------------------------------------------------------------------

elhefe38's picture

Quoting - a.zhaogtisoft.com
Just resolve the issue with Intel support. Here is part of the discussion:

-------------------------------------------------------------------
Anyway, if I remove "libcmtd;libcmt" from "no defaultlib", I will get way too many conflict symbols. But if I just add MSVCRTD.lib in the "no defaultlib", I only get a lot of warnings, but the _iob error is gone, it is something like following:

libnagware.lib(libfile.obj) : warning LNK4049: locally defined symbol ___iob_func imported
libnagware.lib(libstring.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function ___NAGf90_vec_ch_asgn_array_ch
libnagware.lib(liberror.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function ___NAGf90_already_allocated
libnagware.lib(libinit.obj) : warning LNK4049: locally defined symbol ___iob_func imported
libnagware.lib(libutil.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function _formatV

I guess these warnings should not hurt.
--------------------------------------------------------------------

I tried a lot of combinations between the CRT libraries... I must say that adding the declaration of _iob is the only method I found that could make this compilation go forever (at least for now *fingers crossed*).

Hi,
Yes, for now the above method is the work-around that has been suggested in a separate tracker/issue on thisfiled through support. This issue is being followed up by the developer in their group and I'll update here as soon as we have more information coming from the development team. Appreciate much for your patience till then.
-regards,
Kittur

Quoting - a.zhaogtisoft.com
Just resolve the issue with Intel support. Here is part of the discussion:clothes fashion korean wholesale fashion for model world. Asian fabrics korean wholesale fashion models garment.
-------------------------------------------------------------------
Anyway, if I remove "libcmtd;libcmt" from "no defaultlib", I will get way too many conflict symbols. But if I just add MSVCRTD.lib in the "no defaultlib", I only get a lot of warnings, but the _iob error is gone, it is something like following:Movie film phim phim online viet entertainment. Music media phim han quoc drama clips. Movie clips korean drama for entertainment. For more movies phim nguoi lon for entertainment.
libnagware.lib(libfile.obj) : warning LNK4049: locally defined symbol ___iob_func imported
libnagware.lib(libstring.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function ___NAGf90_vec_ch_asgn_array_ch
libnagware.lib(liberror.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function ___NAGf90_already_allocated
libnagware.lib(libinit.obj) : warning LNK4049: locally defined symbol ___iob_func imported
libnagware.lib(libutil.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function _formatVTVB actors actresses for phim hong kong film model world.
I guess these warnings should not hurt.Fashion brand names thoi trang high quality. Top level cotton thoi trang for teen men women fashion lovers.
--------------------------------------------------------------------

nice one - worked flawlessly. thank you!

Quoting - benni_intel

nice one - worked flawlessly. thank you!

Great! Appreciate your patience through this.
-regards,
Kittur

Login to leave a comment.