| Issue 188: | error compiling after upgrade to hxcpp 2.10 | |
| 2 people starred this issue and may be notified of changes. | Back to list |
What is the expected output? What do you see instead?
i have pretty much the same problem. but with haxe 2.09
was going fine with hxcpp 2.09
here is the log
haxelib run hxcpp Build.xml haxe -Ddebug -Dactuate -Dcpp -Ddebug -Ddesktop -Dhaxe_209 -Dhxs -Dmac -Dnme -Dnme_install_tool -Dpolygonal -Dswf -Dsys -Dtrue
Creating hxcpp.h.gch...
g++ -Iinclude -c -fvisibility=hidden -g -isysroot /Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/lib/haxe/lib/hxcpp/2,10//include -DHX_MACOS -m32 -DHXCPP_DEBUG -frtti -o hxcpp.h.gch /usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h
/usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:13:20: error: typeinfo: No such file or directory
/usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:14:20: error: stdint.h: No such file or directory
/usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:21:20: error: string.h: No such file or directory
/usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:25:19: error: wchar.h: No such file or directory
In file included from /usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:170:
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:195:21: error: algorithm: No such file or directory
/usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:16: error: 'int64_t' does not name a type
In file included from /usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:162:
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Object.h:56: error: declaration of 'operator new' as non-function
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Object.h:56: error: expected ';' before '(' token
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Object.h: In member function 'void hx::ObjectPtr<O>::CastPtr(hx::Object*)':
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Object.h:143: error: must #include <typeinfo> before using typeid
In file included from /usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:163:
/usr/lib/haxe/lib/hxcpp/2,10//include/hxString.h: At global scope:
/usr/lib/haxe/lib/hxcpp/2,10//include/hxString.h:20: error: declaration of 'operator new' as non-function
/usr/lib/haxe/lib/hxcpp/2,10//include/hxString.h:20: error: expected ';' before '(' token
/usr/lib/haxe/lib/hxcpp/2,10//include/hxString.h: In member function 'int String::compare(const String&) const':
/usr/lib/haxe/lib/hxcpp/2,10//include/hxString.h:98: error: 'strcmp' was not declared in this scope
In file included from /usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:169:
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Anon.h: In static member function 'static hx::ObjectPtr<hx::Anon_obj> hx::Anon_obj::Create()':
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Anon.h:35: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Anon.h: In static member function 'static hx::ObjectPtr<hx::Anon_obj> hx::Anon_obj::Create(const Dynamic&)':
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Anon.h:36: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Anon.h: In static member function 'static Dynamic hx::Anon_obj::__CreateEmpty()':
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Anon.h:38: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
In file included from /usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:170:
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h: At global scope:
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:80: error: 'size_t' does not name a type
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h: In member function 'void Array_obj<ELEM_>::sort(Dynamic)':
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:388: error: 'sort' is not a member of 'std'
In file included from /usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:171:
/usr/lib/haxe/lib/hxcpp/2,10//include/Class.h: In function 'bool hx::TCanCast(hx::Object*)':
/usr/lib/haxe/lib/hxcpp/2,10//include/Class.h:139: error: must #include <typeinfo> before using typeid
In file included from /usr/lib/haxe/lib/hxcpp/2,10//include/hxcpp.h:179:
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h: In static member function 'static Array<T> Array_obj<ELEM_>::__new(int, int) [with ELEM_ = Dynamic]':
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:486: instantiated from 'Array<ELEM_>::Array(const Dynamic&) [with ELEM_ = Dynamic]'
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Operators.h:247: instantiated from here
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:538: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h: In member function 'Array<T> Array_obj<ELEM_>::concat(Array<T>) [with ELEM_ = Dynamic]':
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:396: instantiated from 'Dynamic Array_obj<ELEM_>::__concat(const Dynamic&) [with ELEM_ = Dynamic]'
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Boot.h:12: instantiated from here
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:549: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h: In member function 'Array<T> Array_obj<ELEM_>::copy() [with ELEM_ = Dynamic]':
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:397: instantiated from 'Dynamic Array_obj<ELEM_>::__copy() [with ELEM_ = Dynamic]'
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Boot.h:12: instantiated from here
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:557: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:558: error: 'memcpy' was not declared in this scope
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h: In member function 'Dynamic Array_obj<ELEM_>::iterator() [with ELEM_ = Dynamic]':
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:399: instantiated from 'Dynamic Array_obj<ELEM_>::__iterator() [with ELEM_ = Dynamic]'
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Boot.h:12: instantiated from here
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:391: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h: In member function 'Array<T> Array_obj<ELEM_>::slice(int, Dynamic) [with ELEM_ = Dynamic]':
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:406: instantiated from 'Dynamic Array_obj<ELEM_>::__slice(const Dynamic&, const Dynamic&) [with ELEM_ = Dynamic]'
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Boot.h:12: instantiated from here
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:568: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h: In member function 'Array<T> Array_obj<ELEM_>::splice(int, int) [with ELEM_ = Dynamic]':
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:407: instantiated from 'Dynamic Array_obj<ELEM_>::__splice(const Dynamic&, const Dynamic&) [with ELEM_ = Dynamic]'
/usr/lib/haxe/lib/hxcpp/2,10//include/hx/Boot.h:12: instantiated from here
/usr/lib/haxe/lib/hxcpp/2,10//include/Array.h:576: warning: no corresponding deallocation function for `void* operator new(long unsigned int)'
Called from ? line 1
Called from BuildTool.hx line 1265
Called from BuildTool.hx line 554
Called from a C function
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 739
Called from BuildTool.hx line 153
Uncaught exception - Error creating pch: 256 - build cancelled
What version of the product are you using? On what operating system?
i'm using haxe 2.09 on A mac snow leaopard
Please provide any additional information below.
every thing is going fine with hxccp 2.09 except i cannot install my compiled app to others computer
i decided to upgrade.
Jul 17, 2012
#1
andy@onthewings.net
Jul 17, 2012
thanks andy this did the trick !
Jul 17, 2012
In my case I solve the problem by the folowing command : ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk /Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
Jul 17, 2012
Hi, Could you try removing the link, and try: xcode-select -switch /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer If this works, it is the "official" way to support this.
Jul 17, 2012
Hi Hugh, I've just tried. The correct command should be: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer After setting it, hxcpp correctly compiles without the link I created previously.
Jul 17, 2012
This is not working on Leopard in any form, to get cpp to work I have modified the file to...
<xml>
<!-- MACOS TOOLS -------------------------------------------------->
<include name="gcc-toolchain.xml"/>
<setenv name="MACOSX_DEPLOYMENT_TARGET" value="10.5" unless="MACOSX_DEPLOYMENT_TARGET" />
<path name="${DEVELOPER_DIR}/usr/bin" />
<set name="GCC_OLD" value="1" />
<compiler id="darwin" exe="g++" if="macos">
<flag value="-c"/>
<flag value="-fvisibility=hidden"/>
<cppflag value="-frtti"/>
<flag value="-g" if="debug"/>
<flag value="-O2" unless="debug"/>
<flag value="-isysroot"/>
<flag value="/Developer/SDKs/MacOSX10.5.sdk"/>
<flag value="-I${HXCPP}/include"/>
<flag value="-DHX_MACOS"/>
<flag value="-m32" unless="HXCPP_M64"/>
<flag value="-m64" if="HXCPP_M64"/>
<flag value="-DHX_LITTLE_ENDIAN=0" if="HXCPP_BIG_ENDIAN"/>
<include name="common-defines.xml" />
<objdir value="obj/darwin${OBJEXT}/" />
<outflag value="-o"/>
<ext value=".o"/>
</compiler>
<linker id="dll" exe="g++" if="macos">
<fromfile value="" if="GCC_OLD" />
<flag value="-fpic"/>
<flag value="-fPIC"/>
<flag value="-dynamiclib"/>
<flag value="-m32" unless="HXCPP_M64"/>
<flag value="-m64" if="HXCPP_M64"/>
<flag value="-framework"/>
<flag value="Cocoa"/>
<flag value="-isysroot"/>
<flag value="/Developer/SDKs/MacOSX10.5.sdk"/>
<flag value="-fvisibility=hidden"/>
<flag value="-debug" if="debug"/>
<ext value=".dylib"/>
<outflag value="-o "/>
</linker>
<linker id="exe" exe="g++" if="macos">
<!-- <flag value="-Wl,-stack_size,0x8000"/> -->
<fromfile value="" if="GCC_OLD" />
<flag value="-framework"/>
<flag value="Cocoa"/>
<flag value="-isysroot"/>
<flag value="/Developer/SDKs/MacOSX10.5.sdk"/>
<flag value="-debug" if="debug"/>
<flag value="-m32" unless="HXCPP_M64"/>
<flag value="-m64" if="HXCPP_M64"/>
<ext value=""/>
<outflag value="-o "/>
</linker>
</xml>
Let me know if you want me to test some other combinations, I not to sure how it all fits together but I was hoping to use the GCC46 more like I guess with linux target, gcc46 is installed by macports which would maybe be more cross os, but seems to be using older gcc that comes with leopard, but sorry my full understanding is very limited, but would be nice if hxcpp was isolated from xcode unless specifically targeting iphone. Are there any implications for me with getting NME working?
Jul 17, 2012
Hi, Have you tried setting DEVELOPER_DIR to the empty string? Another possibility would be to have a fake xcode-select that returns the empty string, or: <set name="DEVELOPER_DIR" value="" if="NO_XCODE" /> and then set NO_XCODE in you hxcpp_config
Jul 18, 2012
Hugh if you have some alternate files email them to me and I will try them. Cheers ;j
Feb 1, 2013
The mac code has changed to use 'xcrun'. Has this fixed the problem?
Status:
Fixed
|