RE: iostream and msvcrt?
Hi Dimi, Thanks for the offer but I have had the project pulled. Unfortunately I couldnt get a working model in time and the hardware has been recycled to another project ;-(. Basically I needed to compile STLport so I could use iostreams in a project I was converting to wine. I'm going to keep my eye on this list as I hope to have a new round of funding approved late in the year. I may also get an old PC at home working and have another go! thanks, scott. -Original Message- From: Dimitrie O. Paun [SMTP:[EMAIL PROTECTED] Sent: Wednesday, 8 September 2004 0:06 To: Scott Snell Cc: Dimitrie O. Paun; Boaz Harrosh; Wine-Devel (E-mail) Subject: Re: iostream and msvcrt? Just got back from vacation. Why is it including a cstdlib? Anyway, can you send me exactly what you did, so I can try to reproduce it on my box? -- Dimi.
Re: iostream and msvcrt?
On Thu, Aug 19, 2004 at 04:00:19PM +1000, Scott Snell wrote: Hi Dimi, Thanks for helping out. I made the changes you suggested to the gcc-mingw.mak file for STLPort. When I go make it does a: wineg++ -I../stlport -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -mno-cygwin -O2 -D_STLP_USE_DYNAMIC_LIB dll_main.cpp -c -o ../lib/obj/MINGW32/ReleaseD/dll_main.o which throws up a world of errors, such as: In file included from ../stlport/cstdlib:25, from ../stlport/stl/debug/_debug.c:160, from ../stlport/stl/debug/_debug.h:418, from ../stlport/utility:40, from dll_main.cpp:35: /usr/include/c++/3.3.2/cstdlib:97: error: `div' not declared /usr/include/c++/3.3.2/cstdlib:102: error: `ldiv' not declared /usr/include/c++/3.3.2/cstdlib: In function `ldiv_t std::div(long int, long int)': Just got back from vacation. Why is it including a cstdlib? Anyway, can you send me exactly what you did, so I can try to reproduce it on my box? -- Dimi.
RE: iostream and msvcrt?
Hi Boaz, Have been off the case for a few days. Is it possible for you to post a copy of your stl_wine.h, stlcomp.h and makefile? I seem to be missing something as I cant get it to work. thanks, Scott. -Original Message- From: Boaz Harrosh [SMTP:[EMAIL PROTECTED] Sent: Sunday, 22 August 2004 22:18 To: Scott Snell Cc: Dimitrie O. Paun; Wine-Devel (E-mail) Subject: Re: iostream and msvcrt? You need to have your stlport/config/stl_wine.h (I based mine on stl_mycomp.h, not stl_gcc.h) and change /stlport/config/stlcomp.h to include it (based on a WINE_GCC flag). You need to do that because of the way STLPort works with headers. you must put a path that will Definitely select wine/msvcrt as the source of stdc. I used ../msvcrt in the header and than Just fixed up the -I list in makefiles (and the WINE_GCC flag or is there a flag that is defined by wingcc). Free Life Boaz
Re: iostream and msvcrt?
Scott Snell wrote: which throws up a world of errors, such as: In file included from ../stlport/cstdlib:25, from ../stlport/stl/debug/_debug.c:160, from ../stlport/stl/debug/_debug.h:418, from ../stlport/utility:40, from dll_main.cpp:35: /usr/include/c++/3.3.2/cstdlib:97: error: `div' not declared /usr/include/c++/3.3.2/cstdlib:102: error: `ldiv' not declared /usr/include/c++/3.3.2/cstdlib: In function `ldiv_t std::div(long int, long int)': I'm sure its something simple but I'm still not comfortable around gcc/winegcc. thanks, Scott. -Original Message- From: Dimitrie O. Paun [SMTP:[EMAIL PROTECTED] adding a path pointing to /include/wine/MSVCRT. No, you shouldn't need that. You just need to make sure you pass the -mno-cygwin flag to winegcc/wineg++. -- Dimi. You need to have your stlport/config/stl_wine.h (I based mine on stl_mycomp.h, not stl_gcc.h) and change /stlport/config/stlcomp.h to include it (based on a WINE_GCC flag). You need to do that because of the way STLPort works with headers. you must put a path that will Definitely select wine/msvcrt as the source of stdc. I used ../msvcrt in the header and than Just fixed up the -I list in makefiles (and the WINE_GCC flag or is there a flag that is defined by wingcc). Free Life Boaz
RE: iostream and msvcrt?
Hi Dimi, Thanks for helping out. I made the changes you suggested to the gcc-mingw.mak file for STLPort. When I go make it does a: wineg++ -I../stlport -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -mno-cygwin -O2 -D_STLP_USE_DYNAMIC_LIB dll_main.cpp -c -o ../lib/obj/MINGW32/ReleaseD/dll_main.o which throws up a world of errors, such as: In file included from ../stlport/cstdlib:25, from ../stlport/stl/debug/_debug.c:160, from ../stlport/stl/debug/_debug.h:418, from ../stlport/utility:40, from dll_main.cpp:35: /usr/include/c++/3.3.2/cstdlib:97: error: `div' not declared /usr/include/c++/3.3.2/cstdlib:102: error: `ldiv' not declared /usr/include/c++/3.3.2/cstdlib: In function `ldiv_t std::div(long int, long int)': I'm sure its something simple but I'm still not comfortable around gcc/winegcc. thanks, Scott. -Original Message- From: Dimitrie O. Paun [SMTP:[EMAIL PROTECTED] On Wed, Aug 18, 2004 at 11:32:33AM +0300, Boaz Harrosh wrote: Better go with gcc-mingw.mak, as threading and OS is more Windows than Linux. See if they have a -nocygwin variant. Yes, it should work with the gcc-mingw.mak by changing gcc - winegcc g++ - wineg++ adding a path pointing to /include/wine/MSVCRT. No, you shouldn't need that. You just need to make sure you pass the -mno-cygwin flag to winegcc/wineg++. -- Dimi.
Re: iostream and msvcrt?
Scott Snell wrote: Is that simpler than fixing the MSVCRT headers? It is not wine-MSVCRT headers fault, these are pure CRT declarations. It is gcc-c++ headers that are heavily dependent on gcc CRT very non-standard headers. So you better go with STLPort. I have used STLport before so the idea sounds feasable to me. I imagine I have to change the gcc-linux.mak by: replacing the call to gcc with winegcc, removing references to GLIBC, Better go with gcc-mingw.mak, as threading and OS is more Windows than Linux. See if they have a -nocygwin variant. adding a path pointing to /include/wine/MSVCRT. Yes exactly. You'll see that you end up with a complete xxx-wine set of makefiles and headers. Anything else? There are some 1-2 defines in the major ARCH headers that go the windows way. I remember I had to define a __WINE_GCC__ in makefile and in a couple of places where they have this heavy #ifdef this #elseif that - I had to add #ifdef __WINE_GCC__ to point the compiler the windows way. But I guess the compiler will show you soon enough where he took the wrong turn. I'll try to dig out that HD anyway Just so we can compare notes. But I'm sure you'll manage before I have time to do that. regards, Scott. Free Life Boaz
Re: iostream and msvcrt?
On Wed, Aug 18, 2004 at 11:32:33AM +0300, Boaz Harrosh wrote: I have used STLport before so the idea sounds feasable to me. I imagine I have to change the gcc-linux.mak by: replacing the call to gcc with winegcc, removing references to GLIBC, Better go with gcc-mingw.mak, as threading and OS is more Windows than Linux. See if they have a -nocygwin variant. Yes, it should work with the gcc-mingw.mak by changing gcc - winegcc g++ - wineg++ adding a path pointing to /include/wine/MSVCRT. Yes exactly. You'll see that you end up with a complete xxx-wine set of makefiles and headers. No, you shouldn't need that. You just need to make sure you pass the -mno-cygwin flag to winegcc/wineg++. -- Dimi.
iostream and msvcrt?
Hi All, Thanks to everyone who has helped me with winelib, so far most things are going really well! However here is an issue I cant solve - iostream and msvcrt. Here is an example file: // test.cpp module #include process.h #include iostream int test() { return 1; } If I compile it using: wineg++ -c -mno-cygwin -I/usr/local/include/wine/msvcrt -o test.o test.cpp or wineg++ -c -I/usr/local/include/wine/msvcrt -o test.o test.cpp I get a multitude of errors such as: In file included from /usr/include/c++/3.3.2/iosfwd:46, from /usr/include/c++/3.3.2/ios:44, from /usr/include/c++/3.3.2/ostream:45, from /usr/include/c++/3.3.2/iostream:45, from test.cpp:2: /usr/include/c++/3.3.2/i386-redhat-linux/bits/c++locale.h:53: error: `uselocale' was not declared in this scope In file included from /usr/include/c++/3.3.2/i386-redhat-linux/bits/c++io.h:35, from /usr/include/c++/3.3.2/bits/fpos.h:44, from /usr/include/c++/3.3.2/iosfwd:49, from /usr/include/c++/3.3.2/ios:44, from /usr/include/c++/3.3.2/ostream:45, from /usr/include/c++/3.3.2/iostream:45, from test.cpp:2: /usr/include/c++/3.3.2/cstdio:167: error: `snprintf' not declared /usr/include/c++/3.3.2/cstdio:168: error: `vfscanf' not declared /usr/include/c++/3.3.2/cstdio:169: error: `vscanf' not declared /usr/include/c++/3.3.2/cstdio:171: error: `vsscanf' not declared So whats my newbie mistake? thanks, Scott.
Re: iostream and msvcrt?
Using gcc's c++ libraries will not work with msvcrt. If it will compile (which it doesn't) it will not load. (Some circular linking) Your best bet is STLPort. Check it out. What I have done is a special makefiles set with special config.h that compiles and links STLPort over msvcrt. I have written to STLPort if they want my changes as support for another platform but I never got a response from them. Do you need me to dig out the old HD and pack you an STLPort compiled over msvcrt? You might need to make some changes because it is from before winegcc times,. Going strait for gcc. and maybe some wine stuff changed since than. Scott Snell wrote: Hi All, Thanks to everyone who has helped me with winelib, so far most things are going really well! However here is an issue I cant solve - iostream and msvcrt. Here is an example file: // test.cpp module #include process.h #include iostream int test() { return 1; } If I compile it using: wineg++ -c -mno-cygwin -I/usr/local/include/wine/msvcrt -o test.o test.cpp or wineg++ -c -I/usr/local/include/wine/msvcrt -o test.o test.cpp I get a multitude of errors such as: In file included from /usr/include/c++/3.3.2/iosfwd:46, from /usr/include/c++/3.3.2/ios:44, from /usr/include/c++/3.3.2/ostream:45, from /usr/include/c++/3.3.2/iostream:45, from test.cpp:2: /usr/include/c++/3.3.2/i386-redhat-linux/bits/c++locale.h:53: error: `uselocale' was not declared in this scope In file included from /usr/include/c++/3.3.2/i386-redhat-linux/bits/c++io.h:35, from /usr/include/c++/3.3.2/bits/fpos.h:44, from /usr/include/c++/3.3.2/iosfwd:49, from /usr/include/c++/3.3.2/ios:44, from /usr/include/c++/3.3.2/ostream:45, from /usr/include/c++/3.3.2/iostream:45, from test.cpp:2: /usr/include/c++/3.3.2/cstdio:167: error: `snprintf' not declared /usr/include/c++/3.3.2/cstdio:168: error: `vfscanf' not declared /usr/include/c++/3.3.2/cstdio:169: error: `vscanf' not declared /usr/include/c++/3.3.2/cstdio:171: error: `vsscanf' not declared So whats my newbie mistake? thanks, Scott.
Re: iostream and msvcrt?
Scott Snell wrote: Hi All, Thanks to everyone who has helped me with winelib, so far most things are going really well! However here is an issue I cant solve - iostream and msvcrt. Here is an example file: Why are you trying to use G++ with the MSVCRT (Microsoft Visual C++ runtime) ? That can surely never work: even if the headers were compatible, the ABI used is not.
Re: iostream and msvcrt?
Mike Hearn wrote: Why are you trying to use G++ with the MSVCRT (Microsoft Visual C++ runtime) ? That can surely never work: even if the headers were compatible, the ABI used is not. He meant in a winelib when a winelib links against msvcrt (-nocygwin on the winegcc command line). Only the C symbols and a few C++ (new delete) are exported from wine's msvcrt.spec so only these get linked. The rest of the C++ symbols are looked for else where. His current problem, though, is Header compatibility. When you don't use -nocygwin than lots of Windows originating code (like MFC) does not compile. Free Life Boaz
RE: iostream and msvcrt?
Hi Mike, Even if I change my command to be: winegcc -c -mno-cygwin -I/usr/local/include/wine/msvcrt -o test.o test.cpp I get the same spread of errors. I am converting an MSVC project that uses both these header files and I'm trying to understand why the MSVCRT header files provided with wine wont work with my project. regards, Scott. -Original Message- From: Mike Hearn [SMTP:[EMAIL PROTECTED] Sent: Tuesday, 17 August 2004 18:38 To: Scott Snell Cc: Wine-Devel (E-mail) Subject: Re: iostream and msvcrt? Why are you trying to use G++ with the MSVCRT (Microsoft Visual C++ runtime) ? That can surely never work: even if the headers were compatible, the ABI used is not.
RE: iostream and msvcrt?
Is that simpler than fixing the MSVCRT headers? I have used STLport before so the idea sounds feasable to me. I imagine I have to change the gcc-linux.mak by: replacing the call to gcc with winegcc, removing references to GLIBC, adding a path pointing to /include/wine/MSVCRT. Anything else? regards, Scott. -Original Message- From: Boaz Harrosh [SMTP:[EMAIL PROTECTED] Sent: Tuesday, 17 August 2004 18:18 To: Scott Snell Cc: Wine-Devel (E-mail) Subject: Re: iostream and msvcrt? Using gcc's c++ libraries will not work with msvcrt. If it will compile (which it doesn't) it will not load. (Some circular linking) Your best bet is STLPort. Check it out. What I have done is a special makefiles set with special config.h that compiles and links STLPort over msvcrt. I have written to STLPort if they want my changes as support for another platform but I never got a response from them. Do you need me to dig out the old HD and pack you an STLPort compiled over msvcrt? You might need to make some changes because it is from before winegcc times,. Going strait for gcc. and maybe some wine stuff changed since than. Scott Snell wrote: