inline SQHash HashObj(const SQObjectPtr &key)
{
switch(type(key)) {
case OT_STRING: return _string(key)->_hash;
case OT_FLOAT: return (SQHash)((SQInteger)_float(key));
case OT_BOOL: case OT_INTEGER: return (SQHash)((SQInteger)_integer(key));
default: return hashptr(key._unVal.pRefCounted); ///<--------------------------------------------
}
}
../../../../src/include/scripting/squirrel/sqtable.h: In function 'SQHash HashObj(const SQObjectPtr&)':
../../../../src/include/scripting/squirrel/sqtable.h:21: error: cast from 'SQRefCounted*' to 'SQInteger' loses precision
make[4]: *** [sqfuncstate.lo] Error 1
I just compiled it on linux without problems.For me, too. What compiler are you using?
Note : before the update squirrel code builded fine on my 64 bit machineThis part I don't get. Cause really: That part you are mentioning was not modified at all. So how can that be...?! :shock:
Sounds like a 64-bit portability issue. Killerbot: are you compiling for 64-bit?Could really be. SQ(Plus) is not yet 64bit compatible. There are tons of notes within the code accordingly. ;-)
I think Squirrel was 64 bit compatible, [...]Squirrel is indeed, but not SQPlus (search for "<TODO> 64-bit" in the code...)...
maybe one of the types that get translated into one another has changed and those type definitions can be in another file ?Ok... this should be SQInteger then... let me check...
maybe one of the types that get translated into one another has changed and those type definitions can be in another file ?Dammed! Maybe I found the error. Could you do me a favour and add the following code into include\scripting\include\squirrel.h:
#ifdef _LP64
#define _SQ64
#endif
#ifndef SQUIRREL_API
#define SQUIRREL_API extern
#endif
at : Diff between revs 3594 and 4648As I said: It's all my fault. :oops:
those :
#ifdef _LP64
#define _SQ64
#endif
got removed.
../../../../src/include/scripting/sqplus/sqplus.h:346: error: invalid conversion
from 'int (*)(SQVM*)' to 'SQInteger (*)(SQVM*)'
../../../../src/include/scripting/sqplus/sqplus.h:346: error: initializing arg
ument 2 of 'static SquirrelObject SquirrelVM::CreateFunction(SquirrelObject&, SQ
Integer (*)(SQVM*), const SQChar*, const SQChar*)'
../../../../src/include/scripting/sqplus/sqplus.h:347: error: invalid conversion
from 'int (*)(SQVM*)' to 'SQInteger (*)(SQVM*)'
../../../../src/include/scripting/sqplus/sqplus.h:347: error: initializing arg
ument 2 of 'static SquirrelObject SquirrelVM::CreateFunction(SquirrelObject&, SQ
Integer (*)(SQVM*), const SQChar*, const SQChar*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'void SqPlus::cre
ateInstanceSetGetHandlers(SquirrelObject&)':
../../../../src/include/scripting/sqplus/sqplus.h:377: error: invalid conversion
from 'int (*)(SQVM*)' to 'SQInteger (*)(SQVM*)'
../../../../src/include/scripting/sqplus/sqplus.h:377: error: initializing arg
ument 2 of 'static SquirrelObject SquirrelVM::CreateFunction(SquirrelObject&, SQ
Integer (*)(SQVM*), const SQChar*, const SQChar*)'
../../../../src/include/scripting/sqplus/sqplus.h:378: error: invalid conversion
from 'int (*)(SQVM*)' to 'SQInteger (*)(SQVM*)'
../../../../src/include/scripting/sqplus/sqplus.h:378: error: initializing arg
ument 2 of 'static SquirrelObject SquirrelVM::CreateFunction(SquirrelObject&, SQ
Integer (*)(SQVM*), const SQChar*, const SQChar*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'char SqPlus::Get
(SqPlus::TypeWrapper<char>, SQVM*, int)':
../../../../src/include/scripting/sqplus/sqplus.h:1890: error: cannot convert 'I
NT*' to 'SQInteger*' for argument '3' to 'SQRESULT sq_getinteger(SQVM*, SQIntege
r, SQInteger*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'unsigned char Sq
Plus::Get(SqPlus::TypeWrapper<unsigned char>, SQVM*, int)':
../../../../src/include/scripting/sqplus/sqplus.h:1891: error: cannot convert 'I
NT*' to 'SQInteger*' for argument '3' to 'SQRESULT sq_getinteger(SQVM*, SQIntege
r, SQInteger*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'short int SqPlus
::Get(SqPlus::TypeWrapper<short int>, SQVM*, int)':
../../../../src/include/scripting/sqplus/sqplus.h:1892: error: cannot convert 'I
NT*' to 'SQInteger*' for argument '3' to 'SQRESULT sq_getinteger(SQVM*, SQIntege
r, SQInteger*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'short unsigned i
nt SqPlus::Get(SqPlus::TypeWrapper<short unsigned int>, SQVM*, int)':
../../../../src/include/scripting/sqplus/sqplus.h:1893: error: cannot convert 'I
NT*' to 'SQInteger*' for argument '3' to 'SQRESULT sq_getinteger(SQVM*, SQIntege
r, SQInteger*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'int SqPlus::Get(
SqPlus::TypeWrapper<int>, SQVM*, int)':
../../../../src/include/scripting/sqplus/sqplus.h:1894: error: cannot convert 'I
NT*' to 'SQInteger*' for argument '3' to 'SQRESULT sq_getinteger(SQVM*, SQIntege
r, SQInteger*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'unsigned int SqP
lus::Get(SqPlus::TypeWrapper<unsigned int>, SQVM*, int)':
../../../../src/include/scripting/sqplus/sqplus.h:1895: error: cannot convert 'I
NT*' to 'SQInteger*' for argument '3' to 'SQRESULT sq_getinteger(SQVM*, SQIntege
r, SQInteger*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'long int SqPlus: :Get(SqPlus::TypeWrapper<long int>, SQVM*, int)':
../../../../src/include/scripting/sqplus/sqplus.h:1896: error: cannot convert 'I NT*' to 'SQInteger*' for argument '3' to 'SQRESULT sq_getinteger(SQVM*, SQIntege r, SQInteger*)'
../../../../src/include/scripting/sqplus/sqplus.h: In function 'long unsigned in t SqPlus::Get(SqPlus::TypeWrapper<long unsigned int>, SQVM*, int)':
../../../../src/include/scripting/sqplus/sqplus.h:1897: error: cannot convert 'I NT*' to 'SQInteger*' for argument '3' to 'SQRESULT sq_getinteger(SQVM*, SQIntege r, SQInteger*)'
Compiling squirrel on 64 bits platforms requires to define the _SQ64 variable so I have added in squirrel Makefile the flag -D_SQ64 in CXXFLAGS and then the compilation succeed.
have done that one adjustment, but there are much more errors now. probably some more things got broken.Oh dear... :-(
EDIT : @Morton : were there out places where such things got removed ??I need to double-check. I have the following resources: Squirell/SQPlus 2.1.0/1.9 original and C::B revision; Squirell/SQPlus 2.1.1/2.3 original and C::B revision. I am diffing them to see...
EDIT : we could maybe simplify things by just following this suggestion :Sure, this would probably be a good idea. It also reduces our modifications on the sources.
just by looking at sqplus.h I see that a lot of SQInteger are now replaced by int. Were does SQIntegers put there by the original authors or were that CB adjustments which got lost in the update ??This seems to hhave been done indeed by Yiannis that time. I think we should ask him and he will hopefully remember. If that's the case we need to replace int by SQInteger again. In addition the same applied to float vs. SQFloat (but only within the focus of SQPlus, not Squirrel).
This seems to hhave been done indeed by Yiannis that time. I think we should ask him and he will hopefully remember. If that's the case we need to replace int by SQInteger again. In addition the same applied to float vs. SQFloat (but only within the focus of SQPlus, not Squirrel).So - it seems Yiannis did that indeed. I will therefore apply the same modifications to SQPlus in SVN. Give me some time and try afterwards... ;-)
ok I will .... patience is a virtue 8) 8) 8) 8) 8)So... guess what: I have done that but now C::B crashes on startup with a weired error message that has it's roots in wxScintilla...?!
ok I will .... patience is a virtue 8) 8) 8) 8) 8)OK - done. Give iot another try, please...
g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT SqPlus.lo -MD -MP -MF .deps/SqPlus.Tpo -c SqPlus.cpp -fPIC -DPIC -o .libs/SqPlus.o
../../../../src/include/scripting/sqplus/sqplus.h: In function 'SquirrelObject SqPlus::RegisterClassType(SQVM*, const SQChar*, const SQChar*)':
../../../../src/include/scripting/sqplus/sqplus.h:1696: error: call of overloaded 'SetValue(const char [5], int&)' is ambiguous
../../../../src/include/scripting/sqplus/SquirrelObject.h:20: note: candidates are: BOOL SquirrelObject::SetValue(INT, bool) <near match>
../../../../src/include/scripting/sqplus/SquirrelObject.h:21: note: BOOL SquirrelObject::SetValue(INT, INT) <near match>
../../../../src/include/scripting/sqplus/SquirrelObject.h:22: note: BOOL SquirrelObject::SetValue(INT, FLOAT) <near match>
../../../../src/include/scripting/sqplus/SquirrelObject.h:23: note: BOOL SquirrelObject::SetValue(INT, const SQChar*) <near match>
../../../../src/include/scripting/sqplus/SquirrelObject.h:26: note: BOOL SquirrelObject::SetValue(const SQChar*, bool)
../../../../src/include/scripting/sqplus/SquirrelObject.h:27: note: BOOL SquirrelObject::SetValue(const SQChar*, INT)
../../../../src/include/scripting/sqplus/SquirrelObject.h:28: note: BOOL SquirrelObject::SetValue(const SQChar*, FLOAT)
../../../../src/include/scripting/sqplus/SquirrelObject.h:29: note: BOOL SquirrelObject::SetValue(const SQChar*, const SQChar*) <near match>
make[4]: *** [SqPlus.lo] Error 1
no luck :no luck, too. Same error on my x86_64.
Fixed in r4667.\o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/
Linking dynamic library: devel\codeblocks.dll
Creating library file: devel\libcodeblocks.a
.objs\base\tinyxml\tinywxuni.o: In function `ZN10NullLogger5ClearEv':
D:/Projektai/CodeBlocks/src/include/logger.h:(.text$_ZN11TiXmlString4quitEv[TiXmlString::quit()]+0xb): undefined reference to `TiXmlString::nullrep_'
D:/Projektai/CodeBlocks/src/include/logger.h:(.text$_ZN11TiXmlStringaSEPKc[TiXmlString::operator=(char const*)]+0x23): undefined reference to `TiXmlString::assign(char const*, unsigned int)'
D:/Projektai/CodeBlocks/src/include/logger.h:(.text$_ZN11TiXmlString4initEjj[TiXmlString::init(unsigned int, unsigned int)]+0x5b): undefined reference to `TiXmlString::nullrep_'
D:/Projektai/CodeBlocks/src/include/logger.h:(.text$_ZN11TiXmlStringC1Ev[TiXmlString::TiXmlString()]+0x8): undefined reference to `TiXmlString::nullrep_'
collect2: ld returned 1 exit status
Process terminated with status 1 (4 minutes, 28 seconds)
4 errors, 0 warnings
rev 4673 introduced linker errors when compiling under windows:Can't reproduce. Are you sure you are using up-to-date project files and tried to re-build the tinyxml target? Because there were some modifications recently that could cause the error.
rev 4673 introduced linker errors when compiling under windows:Can't reproduce. Are you sure you are using up-to-date project files and tried to re-build the tinyxml target? Because there were some modifications recently that could cause the error.
Project Rebuild fixed this problem... Looks like some changes were not noticed by C::B..?Yes and no. We have removed the TIXML #define from the builds. This is not recognised on purpose by C::B. You need to do a re-build therefore.