Re: wineg++ compile error
Yep. I switched to mingw as cross-compiler, and all is right with the world again ;) Thanks everyone! -rino On Tue, Jan 20, 2009 at 11:07 AM, Hin-Tak Leung wrote: > --- On Tue, 20/1/09, Rino Farina wrote: > >> Right, I wasn't able to find iostream among the >> available headers >> (remember, I'm not linking yet). >> >> Stefan, are you suggesting that I install microsofts >> tool-chain and >> compile the code with the ms compiler? Sounds reasonable. >> I'm not sure >> what you mean by PE .exe, though. I have no need to link to >> Linux >> libraries, other than this is a pure windows codebase and >> some of the >> libraries referenced are not available in winelib/msvcrt. > > In that case you might be happier switching to mingw gcc/g++ - either running > it under wine, or as a cross-compiler. It has all the iostreams stuff, > instead of wineg++ . > the > > > >
Re: wineg++ compile error
--- On Tue, 20/1/09, Rino Farina wrote: > Right, I wasn't able to find iostream among the > available headers > (remember, I'm not linking yet). > > Stefan, are you suggesting that I install microsofts > tool-chain and > compile the code with the ms compiler? Sounds reasonable. > I'm not sure > what you mean by PE .exe, though. I have no need to link to > Linux > libraries, other than this is a pure windows codebase and > some of the > libraries referenced are not available in winelib/msvcrt. In that case you might be happier switching to mingw gcc/g++ - either running it under wine, or as a cross-compiler. It has all the iostreams stuff, instead of wineg++ . the
Re: wineg++ compile error
2009/1/21 Rino Farina : > I'm not sure what you mean by PE .exe, though PE is Microsoft's standard executable format for Windows programs, in contrast to ELF, which is the standard Linux executable format.
Re: wineg++ compile error
Right, I wasn't able to find iostream among the available headers (remember, I'm not linking yet). Stefan, are you suggesting that I install microsofts tool-chain and compile the code with the ms compiler? Sounds reasonable. I'm not sure what you mean by PE .exe, though. I have no need to link to Linux libraries, other than this is a pure windows codebase and some of the libraries referenced are not available in winelib/msvcrt. Thanks, Rino On Mon, Jan 19, 2009 at 11:37 PM, Damjan Jovanovic wrote: > On Tue, Jan 20, 2009 at 2:23 AM, Stefan Dösinger > wrote: >>> Yeah, it looks like there's some conflict with iostream and msvcrt: >>> http://www.mail-archive.com/wine-devel@winehq.org/msg08834.html >>> >>> I'm trying to follow the recommendations, but without much luck. >> Maybe try to use the iostream implementation from msvcrt(not sure how to do >> that, though - I never used winelib myself) >> >> Is there any reason why you have to compile the app using winelib? Unless >> you want to link against Linux libraries in your app there is no advantage >> over compiling the application as a PE .exe file(same performance, same >> runtime requirements etc). If you compile it as native .exe you avoid all >> the issues where Linux headers collide with Windows headers. >> > > I thought that Wine's msvcrt didn't have any iostreams yet (#11910, #6457)? > > Damjan > > >
Re: wineg++ compile error
On Tue, Jan 20, 2009 at 2:23 AM, Stefan Dösinger wrote: >> Yeah, it looks like there's some conflict with iostream and msvcrt: >> http://www.mail-archive.com/wine-devel@winehq.org/msg08834.html >> >> I'm trying to follow the recommendations, but without much luck. > Maybe try to use the iostream implementation from msvcrt(not sure how to do > that, though - I never used winelib myself) > > Is there any reason why you have to compile the app using winelib? Unless > you want to link against Linux libraries in your app there is no advantage > over compiling the application as a PE .exe file(same performance, same > runtime requirements etc). If you compile it as native .exe you avoid all > the issues where Linux headers collide with Windows headers. > I thought that Wine's msvcrt didn't have any iostreams yet (#11910, #6457)? Damjan
RE: wineg++ compile error
> Yeah, it looks like there's some conflict with iostream and msvcrt: > http://www.mail-archive.com/wine-devel@winehq.org/msg08834.html > > I'm trying to follow the recommendations, but without much luck. Maybe try to use the iostream implementation from msvcrt(not sure how to do that, though - I never used winelib myself) Is there any reason why you have to compile the app using winelib? Unless you want to link against Linux libraries in your app there is no advantage over compiling the application as a PE .exe file(same performance, same runtime requirements etc). If you compile it as native .exe you avoid all the issues where Linux headers collide with Windows headers.
Re: wineg++ compile error
Yeah, it looks like there's some conflict with iostream and msvcrt: http://www.mail-archive.com/wine-devel@winehq.org/msg08834.html I'm trying to follow the recommendations, but without much luck. On Mon, Jan 19, 2009 at 11:42 AM, Stefan Dösinger wrote: > It looks like you include two headers that define the same type in a > differnet way. Ie, a typdef from a Linux header collides with a windows > typedef from a Wine header. > >> -Original Message- >> From: wine-devel-boun...@winehq.org [mailto:wine-devel- >> boun...@winehq.org] On Behalf Of Rino Farina >> Sent: Monday, January 19, 2009 3:46 PM >> To: wine-devel@winehq.org >> Subject: wineg++ compile error >> >> Hi All, >> >> I'm completely new to wine, and am having trouble compiling code >> before it ever gets to the linker. Can anyone point me in the right >> direction? >> >> BaseGameEntity.h: >> >> #include >> >> class BaseGameEntity >> { >> private: >> int m_ID; >> static int m_iNextValidID; >> >> void SetID(int val); >> >> public: >> BaseGameEntity(int id) >> { >> SetID(id); >> } >> >> virtual ~BaseGameEntity(){} >> >> virtual void Update()=0; >> virtual bool HandleMessage(const long& msg)=0; >> >> int ID()const{return m_ID;} >> }; >> >> BaseGameEntity.cpp: >> >> #include "BaseGameEntity.h" >> #include >> >> int BaseGameEntity::m_iNextValidID = 0; >> void BaseGameEntity::SetID(int val) >> { >> assert ( (val >= m_iNextValidID) && ": invalid >> ID"); >> >> m_ID = val; >> >> m_iNextValidID = m_ID + 1; >> } >> >> >> Console: >> >> make all >> wineg++ -c -mno-cygwin -I. -o BaseGameEntity.o BaseGameEntity.cpp >> 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/bits/char_traits.h:47, >> from >> /usr/lib/gcc/i386-redhat- >> linux/4.3.0/../../../../include/c++/4.3.0/string:47, >> from BaseGameEntity.h:12, >> from BaseGameEntity.cpp:1: >> /usr/include/wchar.h:62: error: conflicting declaration 'typedef >> unsigned int wint_t' >> /usr/include/wine/msvcrt/stdio.h:109: 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/bits/char_traits.h:47, >> from >> /usr/lib/gcc/i386-redhat- >> linux/4.3.0/../../../../include/c++/4.3.0/string:47, >> from BaseGameEntity.h:12, >> from BaseGameEntity.cpp:1: >> /usr/include/wchar.h:527: error: expected initializer before '*' token >> /usr/include/wchar.h:534: error: '__FILE' was not declared in this >> scope >> /usr/include/wchar.h:534: error: '__fp' was not declared in this scope >> /usr/include/wchar.h:534: error: expected primary-expression before >> 'int' >> /usr/include/wchar.h:534: error: initializer expression list treated >> as compound expression >> /usr/include/wchar.h:534: error: expected ',' or ';' before 'throw' >> /usr/include/wchar.h:541: error: 'int fwprintf' redeclared as >> different kind of symbol >> /usr/include/wine/msvcrt/stdio.h:214: error: previous declaration of >> 'int fwprintf(FILE*, const wchar_t*, ...)' >> /usr/include/wchar.h:541: error: '__FILE' was not declared in this >> scope >> /usr/include/wchar.h:541: error: expected primary-expression before >> '__restrict__' >> /usr/include/wchar.h:542: error: expected primary-expression before >> 'const' >> /usr/include/wchar.h:542: error: expected primary-expression before >> '...' token >> /usr/include/wchar.h:553: error: declaration of C function 'int >> swprintf(wchar_t*, size_t, const wchar_t*, ...)' conflicts with >> /usr/include/wine/msvcrt/stdio.h:223: error: previous declaration 'int >> swprintf(wchar_t*, const wchar_t*, ...)' here >> /usr/include/wchar.h:559: error: 'int vfwprintf' redeclared as >> different kind of symbol >> /usr/include/wine/msvcrt/stdio.h:226: error: previous declaration of >> 'int vfwprintf(FILE*, const wchar_t*, char*)' >> /usr/include/wchar.h:559: error: '__FILE' was not declared in this >> scope >> /usr/include/wchar.h:559: error: expected primary-expression before >> '__restrict__' >> /usr/include/wchar.h:560: error: expected primary-expression before >> 'const' >> /usr/include/wchar.h:561: error: expected primary-expression before >> '__arg' >> /usr/include/wchar.h:575: error: declaration of C function 'int >> vswprintf(wchar_t*, size_t, const wchar_t*, char*)' conflicts with >> /usr/include/wine/msvcrt/stdio.h:227: error: previou
RE: wineg++ compile error
It looks like you include two headers that define the same type in a differnet way. Ie, a typdef from a Linux header collides with a windows typedef from a Wine header. > -Original Message- > From: wine-devel-boun...@winehq.org [mailto:wine-devel- > boun...@winehq.org] On Behalf Of Rino Farina > Sent: Monday, January 19, 2009 3:46 PM > To: wine-devel@winehq.org > Subject: wineg++ compile error > > Hi All, > > I'm completely new to wine, and am having trouble compiling code > before it ever gets to the linker. Can anyone point me in the right > direction? > > BaseGameEntity.h: > > #include > > class BaseGameEntity > { > private: > int m_ID; > static int m_iNextValidID; > > void SetID(int val); > > public: > BaseGameEntity(int id) > { > SetID(id); > } > > virtual ~BaseGameEntity(){} > > virtual void Update()=0; > virtual bool HandleMessage(const long& msg)=0; > > int ID()const{return m_ID;} > }; > > BaseGameEntity.cpp: > > #include "BaseGameEntity.h" > #include > > int BaseGameEntity::m_iNextValidID = 0; > void BaseGameEntity::SetID(int val) > { > assert ( (val >= m_iNextValidID) && ": invalid > ID"); > > m_ID = val; > > m_iNextValidID = m_ID + 1; > } > > > Console: > > make all > wineg++ -c -mno-cygwin -I. -o BaseGameEntity.o BaseGameEntity.cpp > 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/bits/char_traits.h:47, > from > /usr/lib/gcc/i386-redhat- > linux/4.3.0/../../../../include/c++/4.3.0/string:47, > from BaseGameEntity.h:12, > from BaseGameEntity.cpp:1: > /usr/include/wchar.h:62: error: conflicting declaration 'typedef > unsigned int wint_t' > /usr/include/wine/msvcrt/stdio.h:109: 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/bits/char_traits.h:47, > from > /usr/lib/gcc/i386-redhat- > linux/4.3.0/../../../../include/c++/4.3.0/string:47, > from BaseGameEntity.h:12, > from BaseGameEntity.cpp:1: > /usr/include/wchar.h:527: error: expected initializer before '*' token > /usr/include/wchar.h:534: error: '__FILE' was not declared in this > scope > /usr/include/wchar.h:534: error: '__fp' was not declared in this scope > /usr/include/wchar.h:534: error: expected primary-expression before > 'int' > /usr/include/wchar.h:534: error: initializer expression list treated > as compound expression > /usr/include/wchar.h:534: error: expected ',' or ';' before 'throw' > /usr/include/wchar.h:541: error: 'int fwprintf' redeclared as > different kind of symbol > /usr/include/wine/msvcrt/stdio.h:214: error: previous declaration of > 'int fwprintf(FILE*, const wchar_t*, ...)' > /usr/include/wchar.h:541: error: '__FILE' was not declared in this > scope > /usr/include/wchar.h:541: error: expected primary-expression before > '__restrict__' > /usr/include/wchar.h:542: error: expected primary-expression before > 'const' > /usr/include/wchar.h:542: error: expected primary-expression before > '...' token > /usr/include/wchar.h:553: error: declaration of C function 'int > swprintf(wchar_t*, size_t, const wchar_t*, ...)' conflicts with > /usr/include/wine/msvcrt/stdio.h:223: error: previous declaration 'int > swprintf(wchar_t*, const wchar_t*, ...)' here > /usr/include/wchar.h:559: error: 'int vfwprintf' redeclared as > different kind of symbol > /usr/include/wine/msvcrt/stdio.h:226: error: previous declaration of > 'int vfwprintf(FILE*, const wchar_t*, char*)' > /usr/include/wchar.h:559: error: '__FILE' was not declared in this > scope > /usr/include/wchar.h:559: error: expected primary-expression before > '__restrict__' > /usr/include/wchar.h:560: error: expected primary-expression before > 'const' > /usr/include/wchar.h:561: error: expected primary-expression before > '__arg' > /usr/include/wchar.h:575: error: declaration of C function 'int > vswprintf(wchar_t*, size_t, const wchar_t*, char*)' conflicts with > /usr/include/wine/msvcrt/stdio.h:227: error: previous declaration 'int > vswprintf(wchar_t*, const wchar_t*, char*)' here > /usr/include/wchar.h:582: error: 'int fwscanf' redeclared as different > kind of symbol > /usr/include/wine/msvcrt/stdio.h:216: error: previous declaration of > 'int fwscanf(FILE*, const wchar_t*, ...)' > /usr/include/wchar.h:582: error: '__FILE' was not declared in this > scope > /usr/include/wchar.h:582