Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

gcc4.7 can't build codeblocks

(1/12) > >>

xunxun:
Error log


--- Code: ---g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -fno-inline -iquote.objs\include -I.objs\include -I. -IF:\MyProject\GUI\wxWidgets\WX_2_8_BRANCH\include -IF:\MyProject\GUI\wxWidgets\WX_2_8_BRANCH\contrib\include -IF:\MyProject\GUI\wxWidgets\WX_2_8_BRANCH\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude\scripting\include -Iinclude\scripting\squirrel -IE:\build\cb\src\sdk\scripting\squirrel -IE:\build\cb\src -c E:\build\cb\src\sdk\scripting\squirrel\sqvm.cpp -o .objs\sdk\scripting\squirrel\sqvm.o
In file included from include\scripting\squirrel/sqobject.h:5:0,
from include\scripting\squirrel/sqpcheader.h:16,
from E:\build\cb\src\sdk\scripting\squirrel\sqvm.cpp:4:
include\scripting\squirrel/squtils.h: In instantiation of 'sqvector<T>::~sqvector() [with T = int]':
include\scripting\squirrel/sqclosure.h:83:52: required from here
include\scripting\squirrel/squtils.h:38:4: error: 'sq_vm_free' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from include\scripting\squirrel/sqpcheader.h:17:0,
from E:\build\cb\src\sdk\scripting\squirrel\sqvm.cpp:4:
include\scripting\squirrel/sqstate.h:142:6: note: 'void sq_vm_free(void*, SQUnsignedInteger)' declared here, later in the translation unit
In file included from include\scripting\squirrel/sqobject.h:5:0,
from include\scripting\squirrel/sqpcheader.h:16,
from E:\build\cb\src\sdk\scripting\squirrel\sqvm.cpp:4:
include\scripting\squirrel/squtils.h: In instantiation of 'void sqvector<T>::_realloc(SQUnsignedInteger) [with T = int; SQUnsignedInteger = unsigned int]':
include\scripting\squirrel/squtils.h:45:4: required from 'void sqvector<T>::resize(SQUnsignedInteger, const T&) [with T = int; SQUnsignedInteger = unsigned int]'
include\scripting\squirrel/squtils.h:27:3: required from 'void sqvector<T>::copy(const sqvector<T>&) [with T = int]'
include\scripting\squirrel/sqclosure.h:97:34: required from here
include\scripting\squirrel/squtils.h:97:3: error: 'sq_vm_realloc' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from include\scripting\squirrel/sqpcheader.h:17:0,
from E:\build\cb\src\sdk\scripting\squirrel\sqvm.cpp:4:
include\scripting\squirrel/sqstate.h:141:7: note: 'void* sq_vm_realloc(void*, SQUnsignedInteger, SQUnsignedInteger)' declared here, later in the translation unit
E:\build\cb\src\sdk\scripting\squirrel\sqvm.cpp: In member function 'bool SQVM::Execute(SQObjectPtr&, SQInteger, SQInteger, SQInteger, SQObjectPtr&, SQBool, SQVM::ExecutionType)':
E:\build\cb\src\sdk\scripting\squirrel\sqvm.cpp:1062:1: warning: control reaches end of non-void function [-Wreturn-type]

--- End code ---

You can see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52446
http://gcc.gnu.org/gcc-4.7/porting_to.html

This can be temporarily worked around by using -fpermissive

oBFusCATed:
Patches welcome, as non of us is that brave to try to build c::b or wx using this alpha version :)

It seems that you have to reorder some functions...

Jenna:

--- Quote from: oBFusCATed on March 01, 2012, 09:48:19 am ---Patches welcome, as non of us is that brave to try to build c::b or wx using this alpha version :)

It seems that you have to reorder some functions...

--- End quote ---
Not completely correct.
I will do it, if I find the time, I have gcc 4.7 on my debian-system since several weeks.

xunxun:
I will use -fpermissive before you modify them. :)

SharkCZ:
I have a patch to fix squirrel (fixed in Fedora squirrel package and also sent to upstream), but I wasn't able to fix the template thing in sqplus.

Navigation

[0] Message Index

[#] Next page

Go to full version