Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

std::cout and other...

lostar
Beginner
934 Views
Sample:

#include "stdafx.h"

#include

int _tmain(int argc, _TCHAR* argv[])
{
std::cout << "hello";

return 0;
}

MSVC.Net to build this sample ia all configurations successfully.
MSVC.Net+ICL7.0 to build this sample in debug configuration succesfully.
MSVC.Net+ICL7.0 to build this sample in release configuration with some errors.


------ Rebuild All started: Project: console, Configuration: Release Win32 ------

Deleting intermediate files and output files for project 'console', configuration 'Release|Win32'.
Compiling...
stdafx.cpp
icl: Command line remark: option '-Wp64' not supported
Compiling...
console.cpp
icl: Command line remark: option '-Wp64' not supported
Linking...
xilink: executing 'link'
Creating library Release/console.lib and object Release/console.exp
console.obj : error LNK2019: unresolved external symbol "?use_facet@?$@V?$ctype@D@std@@@std@@YAABV?$ctype@D@1@ABVlocale@1@@Z" (?use_facet@?$@V?$ctype@D@std@@@std@@YAABV?$ctype@D@1@ABVlocale@1@@Z) referenced in function "public: bool __thiscall std::basic_istream >::_Ipfx(bool)" (?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z)
Release/console.exe : fatal error LNK1120: 1 unresolved externals

Build log was saved at "file://c:WorkconsoleReleaseBuildLog.htm"
console - 2 error(s), 0 warning(s)


My environment: MSVC.Net + ICL7.0, basic project was create with MSVC.Net solution wizard as Win32Project(console).
0 Kudos
3 Replies
JenniferJ
Moderator
934 Views
Try to clean the solution and rebuild again with Intel Compiler. It should solve the problem. It is probably because the pch is turned on. Intel Compiler doesn't understand the pch created by MS. You can find more information about this from the software product web site.

Thanks,
Jennifer
0 Kudos
mallison777
Beginner
934 Views
I am having the same problem on a much larger project. I didn't have pre-compiled headers enabled, but the settings did specify a pch file. I removed this, cleaned the solution, removed all pch files and rebuilt. I am still getting the same error. It compiles and runs in the debug version but not in the release version. While trying different things I noticed that when I switch the Character Set settings to Unicode I get compile errors on some MFC calls and when I have the Character Set as not set (SBCS, which I am using) or MBCS I don't have any compile errors just the link error. This project was converted from version 6.0 to .NET, so I don't know if there are any other relevant settings to address this issue. I have compared all the project settings between the debug and release versions and they are mostly the same (the only big difference being optimizations). Any suggestions for other settings or pointers that might address this would be greatly appreciated.

Thanks,
Mike
0 Kudos
JenniferJ
Moderator
934 Views
The problem of using the Unicode sounds like a bug. Could you please report it to Intel Premier Support at "https://premier.intel.com/"? This way we can better track the problem and help you. Please also send a small test program.
About the difference of debug build and release build, you may want to verify the setting again. If the problem still exist, please also report it to Premier Support.

Thanks,
Jennifer
0 Kudos
Reply