Problems compiling app with STL

Problems compiling app with STL

I am constantly getting this error when compiling any STL application into a DLL. What is causing the problem? I am surprised nobody is getting this problem:

Linking...
IPO: using IR in .Release
_draw.obj
IPO: using IR in .Release
_font.obj
IPO: using IR in .Release
_kmf.obj
IPO: using IR in .Release
_landscape.obj
IPO: using IR in .Release
_main.obj
IPO: using IR in .Release
_md2.obj
IPO: using IR in .Release
_model.obj
IPO: using IR in .Release
_octree.obj
IPO: using IR in .Release
_shader.obj
IPO: using IR in .Release
_state.obj
IPO: using IR in .Release
_textures.obj
IPO: using IR in .Release
_vertex.obj
IPO: using IR in .Releaseui_button.obj
IPO: using IR in .Releaseui_checkbutton.obj
IPO: using IR in .Releaseui_edit.obj
IPO: using IR in .Releaseui_label.obj
IPO: using IR in .Releaseui_main.obj
IPO: using IR in .Releaseui_slider.obj
IPO: using IR in .Releaseui_window.obj
IPO: using IR in .Releasem_matrix.obj
IPO: using IR in .Releasem_plane.obj
IPO: using IR in .Releasem_vector.obj
IPO: using IR in .Releasem_vector2.obj
IPO: using IR in .Releasem_vector4.obj
IPO: using IR in .Releasem_view.obj
IPO: using IR in .Releasex_brush.obj
IPO: using IR in .Releasex_image.obj
IPO: using IR in .Releasex_path.obj
IPO: using IR in .Releasex_tga.obj
IPO: using IR in .Releaseextgl.obj
IPO: using IR in .Releaseo_console.obj
IPO: using IR in .Releaseo_gfx.obj
IPO: using IR in .Releaseo_input.obj
IPO: using IR in .Releaseo_logging.obj
IPO: using IR in .Releaseo_net.obj
IPO: using IR in .Releaseo_omicron.obj
IPO: using IR in .Releaseo_shared.obj
IPO: using IR in .Releaseo_sound.obj
IPO: using IR in .Releaseo_wnd.obj
IPO: using IR in .Releasep_emitter.obj
IPO: using IR in .Releasep_system.obj
IPO: using IR in .Releasep_type.obj
IPO: using IR in .Releasef_in.obj
IPO: using IR in .Releasef_main.obj
IPO: using IR in .Releasef_out.obj
IPO: performing multi-file optimizations
IPO Error: unresolved : ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@
Referenced in 10483.obj
IPO Error: unresolved : ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@
Referenced in 10483.obj
C:VS.NetVc7includeiosfwd(288) : (col. 34) remark: LOOP WAS VECTORIZED.
.
ender
_font.cpp(136) : (col. 3) remark: LOOP WAS VECTORIZED.
.
ender
_font.cpp(224) : (col. 36) remark: LOOP WAS VECTORIZED.
.
ender
_font.cpp(197) : (col. 35) remark: LOOP WAS VECTORIZED.
C:VS.NetVc7includememory(237) : (col. 25) remark: LOOP WAS VECTORIZED.
C:VS.NetVc7includememory(237) : (col. 25) remark: LOOP WAS VECTORIZED.
IPO compilation(0): warning #1201: too many functions; disabling COMDAT function packaging
xilink: executing 'link'
Creating library .Release/engine.lib and object .Release/engine.exp
10483.obj : error LNK2001: unresolved external symbol "const std::basic_istream >::`vftable'" (??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@)
10483.obj : error LNK2001: unresolved external symbol "const std::basic_ostream >::`vftable'" (??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@)
10483.obj : error LNK2001: unresolved external symbol "const std::basic_ostream >::`vbtable'" (??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@)
10483.obj : error LNK2001: unresolved external sy
mbol "const std::basic_istream >::`vbtable'" (??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@)
.Release/engine.dll : fatal error LNK1120: 4 unresolved externals

I am not using precompiled headers by the way. I am using MSVC.Net 2003 and ICL 7.1.013. The above project is an IA32 target.
Thanks for your help.

Regards,
-Ad

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

Hello Ad,

this problem is new for me (but I use .net 2002, so perhaps that makes the difference).

I'm answering because I have a related problem: As said, I can compile programs which use the STL, but they consistently crashes at the first use of stream output on the console window. This problem only occurs, if I compile with IPO _and_ O2 or O3 optimization level. Also nobody else seem to have this problem, strange...

Good luck with your problems,
Markus

Ad,
This is a known issue with the compiler that has recently been fixed. It isn't in a compiler available to the public yet, but it will be soon. Stay tuned!

I have downloaded the latest version of Intel C++ Compiler v7.1.016. I am still getting the same errors when compiling my app!

It seems to me that Intel has along way to go in fixing this problem.

-Ad

Yes, this problem with IPO compilation (using latest ICL 7.1 and .NET2003) can be seen for the simplest code too
//h.cpp
#include
void main()
{
std::cout << "Hello";
}
//
Compilation with IPO
icl -MD -Qipo h.cpp
gives similar errors from xilink

As a workaround (at least for this example) you can use
wchar_t as native type (add switch -Zc:wchar_t)

Leave a Comment

Please sign in to add a comment. Not a member? Join today