http://bugs.winehq.org/show_bug.cgi?id=31255
Bug #: 31255 Summary: msvcp100 missing _J versions of several functions Product: Wine Version: 1.5.9 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: msvcp AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
Given the program y.cc and a 32 bit system:
#include <iostream> using namespace std; int main() { char name[256]; cout << "Enter your name: "; cin.getline (name, 256); cout << "Your name is " << name << endl; return 0; }
Compile this with Visual C++ and /MD, and run it with wine.
With Visual C++ 2005, it works fine. with Visual C++ 2010, it crashes with wine: Call from 0x7ecac7e2 to unimplemented function msvcp100.dll.?width@ios_base@std@@QBE_JXZ, aborting
mscodescan reports it imports following stubs from msvcp100: ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PAD_J@Z ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE_JPBD_J@Z ?width@ios_base@std@@QAE_J_J@Z ?width@ios_base@std@@QBE_JXZ
The similar imports for the version built with visual C++ 2005 are: $ winedump -j import y.exe | egrep 'getline|putn|width' | awk '{print $2}' | sort ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z ?width@ios_base@std@@QAEHH@Z ?width@ios_base@std@@QBEHXZ
Evidently, Visual C++ 2010 uses _J instead of H throughout in those imports.