User forums > Help
Errors building C::B rev2688
mdelfede:
--- Quote from: killerbot on July 07, 2006, 11:08:16 pm ---no solution, been out of country for 2 days, just confirming I have this also, from the first revision with squirrel and still in today's revision. Suse Linux 10.1 (64bit) GCC 4.1.0
Just did a quick reading of the responses can we add both definitions for the pointer based and reference based (or even pointer reference based) ???
I hope this is fixed soon, otherwise I can't debug :-( (since GDB on winXP64-bit crashes and now I can't build on linux ...)
--- End quote ---
Updated to GCC 4.1.2 prerelease SuSe, no changes.... I guess it's a problem of 4.1 series. It seems that when templates are instantiated the definition of Push(SQVM *, wxArrayString *) is not yet known, even it should.....
Inserting this
......................
var(&ProjectFile::weight, "weight").
var(&ProjectFile::compilerVar, "compilerVar");
SQVM *sss ; <==
wxArrayString *xxx ; <==
SqPlus::Push(sss, xxx) ; <==
SqPlus::SQClassDef<CompileOptionsBase>("CompileOptionsBase").
func(&CompileOptionsBase::SetLinkerOptions, "SetLinkerOptions").
func(&CompileOptionsBase::SetLinkLibs, "SetLinkLibs").
......................
gives no error in inserted lines, so the problem is not a definition missing of Push(SQVM*, wxArrayString *); I think is a template problem in 4.1 compiler. No solution yet :cry:
<edit>
I found a similar problem in squirrel forum.... I'll ask there if somebody solved it.
TDragon:
--- Quote from: mdelfede on July 08, 2006, 12:03:36 am ---It seems that when templates are instantiated the definition of Push(SQVM *, wxArrayString *) is not yet known, even it should.....
--- End quote ---
Indeed. This has the appearance of either a GCC regression or some funky stuff in wxArrayString that GCC doesn't like.
A Temporary Fix:
Add the following to scriptbindings.cpp above the inclusion of "scriptbindings.h":
--- Code: ---class SQVM;
namespace SqPlus { void Push(SQVM*, const wxArrayString&); }
--- End code ---
What I've Found So Far:
For some reason, the version of Push that is declared with the DECLARE_INSTANCE_TYPE macro trickery is not being found by the compiler. This is only happening for the wxArrayString version; others such as wxString appear not to have any issues. If its declaration or definition appears before the definition of struct ReturnSpecialization in sqplus.h (inside of which SqPlusConst.h and the Call function are included), the compiler is happy; if anywhere after (as far as I've seen), it complains.
I've been digging around in the preprocessed scriptbindings.cpp and found no reason it shouldn't work (as it apparently does in GCC 4.0 series and earlier), as the function is certainly defined before the template is actually instantiated with the call to func(). Further reports as results warrant.
tekel:
from reading the GCC 4.1 release notes they did some fixes to the way GCC handles inlines
if you add these two CFLAGS the program compiles just fine
-frepo -fno-implement-inlines
However I am now getting linking errors, Might be the new flags might be somethign else.
I am implementing your fix now and will report back.
So I still have linking errors which tell me that the GCC options do in fact work :-D
tekel:
After Passing the inline error I can compile C::B Properly but now I get this In linking
.libs/libcodeblocks.so.0.0.1
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: scripting/bindings/.libs/libsqbindings.a(scriptbindings.o): relocation R_X86_64_PC32 against `SqPlus::SQClassDef<ConfigManager>::SQClassDef(char const*, char const*)' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
Any Suggestions ???
killerbot:
--- Quote ---class SQVM;
namespace SqPlus { void Push(SQVM*, const wxArrayString&); }
--- End quote ---
allowed me to build :-)
But it get this error message when CB starts up :
--- Code: ---SquirrelFunction<> call failed
AN ERROR HAS OCCURED [arith op + on between 'userdata' and 'userdata']
CALLSTACK
*FUNCTION [RegisterWizard()] /usr/local/share/codeblocks/templates/wizard/config.script line [51]
*FUNCTION [RegisterWizards()] /usr/local/share/codeblocks/templates/wizard/config.script line [11]
LOCALS
[category] USERPOINTER
[title] USERPOINTER
[folder] USERPOINTER
[type] 0
[this] TABLE
[this] TABLE
--- End code ---
clicking on OK; leads the to the next error message :
--- Quote ---GetInstance: Invalid argument type
--- End quote ---
clickin on OK --> finally in CB :-)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version