🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

[solved] Compile error - AMD64 - Fedora Core 5

Started by
2 comments, last by rmy 17 years, 11 months ago
I get a compile error when I try to build angelscript on Fedora Core 5 with and Athlon 64 processor. Seems like there are some inconcistency on the use of asINT and size_t which triggers the errors. As in...

template <class T> class asCArray
{
public:
        ...
        size_t GetLength() const;
        ...
};


asUINT asCArray<T>::GetLength() const
{
        return length;
}


Not sure if this has to do with the fact that I am running a 64 bit system, or if it has something to do with the compiler version, or both.
[rmy@localhost gnuc]$ gcc --version
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[rmy@localhost gnuc]$ uname -a
Linux localhost.localdomain 2.6.17-1.2139_FC5 #1 SMP Fri Jun 23 12:40:11 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux

[rmy@localhost gnuc]$ make
gcc -g -Wall -o obj/as_anyobject.o -c ../../source/as_anyobject.cpp
../../source/../include/angelscript.h:552: warning: ‘class asIOutputStream’ has virtual functions but non-virtual destructor
../../source/../include/angelscript.h:558: warning: ‘class asIBinaryStream’ has virtual functions but non-virtual destructor
../../source/as_array.h:109: error: prototype for ‘asUINT asCArray<T>::GetLength() const’ does not match any in class ‘asCArray<T>’
../../source/as_array.h:53: error: candidate is: size_t asCArray<T>::GetLength() const
../../source/as_array.h:109: error: template definition of non-template ‘asUINT asCArray<T>::GetLength() const’
../../source/as_array.h:115: error: prototype for ‘const T& asCArray<T>::operator[](asUINT) const’ does not match any in class ‘asCArray<T>’
../../source/as_array.h:59: error: candidates are: T& asCArray<T>::operator[](size_t)
../../source/as_array.h:58: error:                 const T& asCArray<T>::operator[](size_t) const
../../source/as_array.h:115: error: template definition of non-template ‘const T& asCArray<T>::operator[](asUINT) const’
../../source/as_array.h:123: error: prototype for ‘T& asCArray<T>::operator[](asUINT)’ does not match any in class ‘asCArray<T>’
../../source/as_array.h:115: error: candidates are: const T& asCArray<T>::operator[](asUINT) const
../../source/as_array.h:59: error:                 T& asCArray<T>::operator[](size_t)
../../source/as_array.h:58: error:                 const T& asCArray<T>::operator[](size_t) const
../../source/as_array.h:123: error: template definition of non-template ‘T& asCArray<T>::operator[](asUINT)’
../../source/as_array.h:148: error: prototype for ‘void asCArray<T>::Allocate(asUINT, bool)’ does not match any in class ‘asCArray<T>’
../../source/as_array.h:46: error: candidate is: void asCArray<T>::Allocate(size_t, bool)
../../source/as_array.h:148: error: template definition of non-template ‘void asCArray<T>::Allocate(asUINT, bool)’
../../source/as_array.h:173: error: prototype for ‘asUINT asCArray<T>::GetCapacity() const’ does not match any in class ‘asCArray<T>’
../../source/as_array.h:47: error: candidate is: size_t asCArray<T>::GetCapacity() const
../../source/as_array.h:173: error: template definition of non-template ‘asUINT asCArray<T>::GetCapacity() const’
../../source/as_array.h:179: error: prototype for ‘void asCArray<T>::SetLength(asUINT)’ does not match any in class ‘asCArray<T>’
../../source/as_array.h:52: error: candidate is: void asCArray<T>::SetLength(size_t)
../../source/as_array.h:179: error: template definition of non-template ‘void asCArray<T>::SetLength(asUINT)’
../../source/as_array.h:188: error: prototype for ‘void asCArray<T>::Copy(const T*, asUINT)’ does not match any in class ‘asCArray<T>’
../../source/as_array.h:55: error: candidate is: void asCArray<T>::Copy(const T*, size_t)
../../source/as_array.h:188: error: template definition of non-template ‘void asCArray<T>::Copy(const T*, asUINT)’
../../source/as_scriptengine.h:63: warning: ‘class asCFunctionStream’ has virtual functions but non-virtual destructor
make: *** [obj/as_anyobject.o] Error 1

[Edited by - rmy on August 7, 2006 2:53:41 AM]
Advertisement
download revision 50 and later from the subversion repository, I had the same problem
http://www.8ung.at/basiror/theironcross.html
Or download version 2.7.0 from AngelScript's site. It was recently released and I made sure it compiled and ran on AMD64 with Linux using SourceForge.net's compile farm.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Quote: Original post by WitchLord
Or download version 2.7.0 from AngelScript's site. It was recently released and I made sure it compiled and ran on AMD64 with Linux using SourceForge.net's compile farm.


I was attempting to compile 2.7.0 which I downloaded from the site just before. But I will try to download from subversion when I am back on the 64 bit computer on monday. BTW: Thanks for a great scripting library.

EDIT: A grep for VERSION in angelscript.h proved that I had messed this up somehow. I now downloaded the real version 2.7.0 and it now works...

[Edited by - rmy on August 7, 2006 2:15:54 AM]

This topic is closed to new replies.

Advertisement