Hello Wine Developers-
I am trying to compile a windows project on Linux using winemaker and I'm stuck with a problem and was wondering if any of you have encountered it before or have any suggestions.
In some of the compilation units in my project, I am using std::ofstream that is defined in the "fstream" header file and included as #include <fstream>. Since wine does not provide this header file, the one provided by gcc is used by the wine compiler -- which in turn includes quite a few headers of its own. A number of symbols defined in these headers conflict with the ones provided by wine and produce compiler errors such as these:
In file included from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/cwchar:52, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/postypes.h:47, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/iosfwd:47, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/ios:44, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/istream:45, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/fstream:45, from /home/praveen/wine-projects/myProject/tengine.h:25, from /home/praveen/wine-projects/myProject/teassembly.h:19, from teassembly.cpp:17: /usr/include/wchar.h: At global scope: /usr/include/wchar.h:62: error: conflicting declaration 'typedef unsigned int wint_t' /usr/local/include/wine/msvcrt/ctype.h:30: error: 'wint_t' has a previous declaration as 'typedef short unsigned int wint_t'
In file included from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/cwchar:52, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/postypes.h:47, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/iosfwd:47, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/ios:44, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/istream:45, from /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/fstream:45, from /home/praveen/wine-projects/myProject/tengine.h:25, from /home/praveen/wine-projects/myProject/teassembly.h:19, from teassembly.cpp:17: /usr/include/wchar.h:246: error: declaration of C function 'wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**)' conflicts with /usr/local/include/wine/msvcrt/string.h:122: error: previous declaration 'wchar_t* wcstok(wchar_t*, const wchar_t*)' here
My understanding is that Wine has implemented msvcrt and provides the associated header files but not the c++ headers. Am I right? What could be the solution here? I would greatly appreciate any help. I am using wine-1.0-rc4 on Fedora 9. Thanks in advance.
-Praveen