Cross-Compiling
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm
Cross-Compiling
I've been working on cross-compiling with mingw32...
I got well into it, and the configure was going smoothly until it said I need library xml2. Which I already have. Any ideas as to what may have gone wrong?
I got well into it, and the configure was going smoothly until it said I need library xml2. Which I already have. Any ideas as to what may have gone wrong?
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm
No...
What I *have* done is gotten libSDL and libxml2, and configured them both... just haven't compiled them.
The commands I used were:
For libSDL - ./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
And for libxml2 - ./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --with-python=no
With those, should i finish compiling libSDL and libxml2?
What I *have* done is gotten libSDL and libxml2, and configured them both... just haven't compiled them.
The commands I used were:
For libSDL - ./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
And for libxml2 - ./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --with-python=no
With those, should i finish compiling libSDL and libxml2?
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm
Actually... it seems to be working... it'll prolly take a LONG time to compile on my 2.4ghz single-core machine though.
EDIT: Scratch That. I seem to be getting some errors.
engine/ePath.cpp:37: error: ‘tHeap<eHalfEdge> open’ redeclared as different kind of symbol
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/io.h:295: error: previous declaration of ‘int open(const char*, int, ...)’
engine/ePath.cpp: In static member function ‘static void eHalfEdge::ClearPathData()’:
engine/ePath.cpp:113: error: request for member ‘Len’ in ‘open’, which is of non-class type ‘int ()(const char*, int, ...)’
engine/ePath.cpp:115: error: request for member ‘Remove’ in ‘open’, which is of non-class type ‘int ()(const char*, int, ...)’
engine/ePath.cpp: In static member function ‘static void eHalfEdge::FindPath(const eCoord&, const eFace*, const eCoord&, const eFace*, const eGameObject*, ePath&)’:
engine/ePath.cpp:167: error: no matching function for call to ‘eHalfEdge::SetMinPathLength(REAL, int (&)(const char*, int, ...), ePATH_ORIGIN)’
engine/ePath.cpp:140: note: candidates are: void eHalfEdge::SetMinPathLength(REAL, tHeapBase&, ePATH_ORIGIN)
engine/ePath.cpp:176: error: request for member ‘Len’ in ‘open’, which is of non-class type ‘int ()(const char*, int, ...)’
engine/ePath.cpp:182: error: request for member ‘Remove’ in ‘open’, which is of non-class type ‘int ()(const char*, int, ...)’
engine/ePath.cpp: In member function ‘void eHalfEdge::PossiblePath(ePATH_ORIGIN, REAL)’:
engine/ePath.cpp:323: error: no matching function for call to ‘eHalfEdge::SetMinPathLength(REAL&, int (&)(const char*, int, ...), ePATH_ORIGIN&)’
engine/ePath.cpp:140: note: candidates are: void eHalfEdge::SetMinPathLength(REAL, tHeapBase&, ePATH_ORIGIN)
engine/ePath.cpp:333: error: no matching function for call to ‘eHalfEdge::SetMinPathLength(REAL&, int (&)(const char*, int, ...), ePATH_ORIGIN&)’
engine/ePath.cpp:140: note: candidates are: void eHalfEdge::SetMinPathLength(REAL, tHeapBase&, ePATH_ORIGIN)
engine/ePath.cpp: In member function ‘virtual tHeapBase* eHalfEdge::Heap() const’:
engine/ePath.cpp:351: error: cannot convert ‘int (*)(const char*, int, ...)’ to ‘tHeapBase*’ in return
make[3]: *** [libengine_a-ePath.o] Error 1
make[3]: Leaving directory `/home/tron/0.2.8/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tron/0.2.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tron/0.2.8'
make: *** [all] Error 2
EDIT: Scratch That. I seem to be getting some errors.
engine/ePath.cpp:37: error: ‘tHeap<eHalfEdge> open’ redeclared as different kind of symbol
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/io.h:295: error: previous declaration of ‘int open(const char*, int, ...)’
engine/ePath.cpp: In static member function ‘static void eHalfEdge::ClearPathData()’:
engine/ePath.cpp:113: error: request for member ‘Len’ in ‘open’, which is of non-class type ‘int ()(const char*, int, ...)’
engine/ePath.cpp:115: error: request for member ‘Remove’ in ‘open’, which is of non-class type ‘int ()(const char*, int, ...)’
engine/ePath.cpp: In static member function ‘static void eHalfEdge::FindPath(const eCoord&, const eFace*, const eCoord&, const eFace*, const eGameObject*, ePath&)’:
engine/ePath.cpp:167: error: no matching function for call to ‘eHalfEdge::SetMinPathLength(REAL, int (&)(const char*, int, ...), ePATH_ORIGIN)’
engine/ePath.cpp:140: note: candidates are: void eHalfEdge::SetMinPathLength(REAL, tHeapBase&, ePATH_ORIGIN)
engine/ePath.cpp:176: error: request for member ‘Len’ in ‘open’, which is of non-class type ‘int ()(const char*, int, ...)’
engine/ePath.cpp:182: error: request for member ‘Remove’ in ‘open’, which is of non-class type ‘int ()(const char*, int, ...)’
engine/ePath.cpp: In member function ‘void eHalfEdge::PossiblePath(ePATH_ORIGIN, REAL)’:
engine/ePath.cpp:323: error: no matching function for call to ‘eHalfEdge::SetMinPathLength(REAL&, int (&)(const char*, int, ...), ePATH_ORIGIN&)’
engine/ePath.cpp:140: note: candidates are: void eHalfEdge::SetMinPathLength(REAL, tHeapBase&, ePATH_ORIGIN)
engine/ePath.cpp:333: error: no matching function for call to ‘eHalfEdge::SetMinPathLength(REAL&, int (&)(const char*, int, ...), ePATH_ORIGIN&)’
engine/ePath.cpp:140: note: candidates are: void eHalfEdge::SetMinPathLength(REAL, tHeapBase&, ePATH_ORIGIN)
engine/ePath.cpp: In member function ‘virtual tHeapBase* eHalfEdge::Heap() const’:
engine/ePath.cpp:351: error: cannot convert ‘int (*)(const char*, int, ...)’ to ‘tHeapBase*’ in return
make[3]: *** [libengine_a-ePath.o] Error 1
make[3]: Leaving directory `/home/tron/0.2.8/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tron/0.2.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tron/0.2.8'
make: *** [all] Error 2
I'm not sure about the switches but you definitely need to compile the libraries, just configuring them is not enough.F! Infamous wrote:No...
What I *have* done is gotten libSDL and libxml2, and configured them both... just haven't compiled them.
The commands I used were:
For libSDL - ./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
And for libxml2 - ./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --with-python=no
With those, should i finish compiling libSDL and libxml2?
the error you're getting is caused by you having two identifiers with the same name: the libc function open() and the heap object thingy
there are a couple of ways to solve that:
1) change all occurrences of open that refer to the object to something else -- probably The right thing to do (tm)
2) try to prevent io.h from getting included -- the error doesn't appear on linux, so i guess that file doesn't use any of the C io functions
3) place #define open open_foo just above the open object declaration -- hackish, but chances are it will work
4) something else i haven't thought of...
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm
k. I fixed that. New Errors!
tron/gGame.cpp: In member function ‘ePlayerNetID* gHighscoresBase::online(int)’:
tron/gGame.cpp:634: error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘virtual void gHighscoresBase::greet_this(ePlayerNetID*, tOutput&)’:
tron/gGame.cpp:749: error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘void highscores<T>::Add(ePlayerNetID*, T)’:
tron/gGame.cpp:913: error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘void highscores<T>::Check(const ePlayerNetID*, T)’:
tron/gGame.cpp:935: error: ‘const class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘void ladder::winner(eTeam*)’:
tron/gGame.cpp error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘ePlayerNetID* gHighscoresBase::online(int)’:
tron/gGame.cpp:634: error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘virtual void gHighscoresBase::greet_this(ePlayerNetID*, tOutput&)’:
tron/gGame.cpp:749: error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘void highscores<T>::Add(ePlayerNetID*, T)’:
tron/gGame.cpp:913: error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘void highscores<T>::Check(const ePlayerNetID*, T)’:
tron/gGame.cpp:935: error: ‘const class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp: In member function ‘void ladder::winner(eTeam*)’:
tron/gGame.cpp error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
tron/gGame.cpp error: ‘class ePlayerNetID’ has no member named ‘GetUserNameA’
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm
what windows.h? (sorry for the noobish question) Is there supposed to be one included with the source, or use the one from (i think) mingW32?
/me is confuzzled about this one...
/me is confuzzled about this one...
Last edited by Infa(mous) on Thu Dec 25, 2008 5:00 am, edited 1 time in total.
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm
- Lucifer
- Project Developer
- Posts: 8640
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
Heh, just checking basics. I thought that page said something about where to get the windows headers and libraries.
It's in the mingw distribution, but you have to look over what's there. If you're in a debian distribution, you can apt-get a cross-compiler.
Mingw is distributed kinda funky, it's a bunch of small packages taht aren't really released in one big package anymore.
It's in the mingw distribution, but you have to look over what's there. If you're in a debian distribution, you can apt-get a cross-compiler.
Mingw is distributed kinda funky, it's a bunch of small packages taht aren't really released in one big package anymore.
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm
- Infa(mous)
- Round Winner
- Posts: 255
- Joined: Thu Aug 14, 2008 11:27 pm