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.
http://bugs.winehq.org/show_bug.cgi?id=31255
--- Comment #1 from Dan Kegel dank@kegel.com 2012-07-19 11:29:47 CDT --- Created attachment 41050 --> http://bugs.winehq.org/attachment.cgi?id=41050 Source and binary compiled with both Visual C 2005 and 2010
http://bugs.winehq.org/show_bug.cgi?id=31255
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
http://bugs.winehq.org/show_bug.cgi?id=31255
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com Severity|normal |minor
http://bugs.winehq.org/show_bug.cgi?id=31255
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |4bdaa20a73e86e6170453e28d7a | |2527154c09a0f Status|NEW |RESOLVED CC| |piotr.caban@gmail.com Resolution| |FIXED
--- Comment #2 from Piotr Caban piotr.caban@gmail.com 2012-08-17 03:44:54 CDT --- Attached test program works now. Marking as fixed.
http://bugs.winehq.org/show_bug.cgi?id=31255
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2012-08-17 13:54:21 CDT --- Closing bugs fixed in 1.5.11.