jcward / hxtelemetry

Haxe Telemetry Generator for hxScout
MIT License
61 stars 13 forks source link

Not compiling in Haxe version 3.3.0-rc1 #42

Closed MintPaw closed 8 years ago

MintPaw commented 8 years ago

When compiling using -Dtelemetry yields this error

Error: While running :g++ -I/home/mintpaw/<gamepath>/bin/linux64/cpp/obj/obj/linux64-debug/__pch/haxe -Iin
clude -c -fvisibility=hidden -g -fpic -fPIC -DHX_LINUX -DHXCPP_DEBUG -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_STACK_TRACE -DHXCPP_TELEME
TRY -DHXCPP_API_LEVEL=330 -m64 -DHXCPP_M64 -I/home/mintpaw/.dotfiles/tools/haxelib/hxcpp/3,3,49/include -x c++ -frtti -Wno-invalid-offse
tof ./src/hxtelemetry/CppHxTelemetry.cpp -o/home/mintpaw/<gamepath>/bin/linux64/cpp/obj/obj/linux64-debug/
738e0868_CppHxTelemetry.o
./src/hxtelemetry/CppHxTelemetry.cpp: In static member function ‘static void hxtelemetry::CppHxTelemetry_obj::dump_telemetry_frame(Int, 
haxe::io::Output, Dynamic)’:
./src/hxtelemetry/CppHxTelemetry.cpp:140:45: error: return-statement with a value, in function returning 'void' [-fpermissive]
 if (frame==0 || output==null()) return null();
MintPaw commented 8 years ago

Whoops, this works with the github version, just not the haxelib version, I recommend pushing it out as 3.3.0-rc1 is the main advertised compiler now.

jcward commented 8 years ago

Ah, yes, there was a set of changes 25 days ago (including some in hxcpp: https://github.com/HaxeFoundation/hxcpp/pull/467) -- thanks for the note, filing new issue for updating haxelib.

synek317 commented 7 years ago

When I use hxcpp from git, I have following error:

- Link : ApplicationMain.exe
   Creating library ApplicationMain.lib and object ApplicationMain.exp
a060308a_HxTelemetry.obj : error LNK2019: unresolved external symbol "int __cdecl __hxcpp_hxt_start_telemetry(bool,bool)" (?__hxcpp_hxt_start_telemetry@@YAH_N0@Z) referenced in function "public: int __thiscall hxtelemetry::HxTelemetry_obj::init_profiler_for_this_thread(void)" (?init_profiler_for_this_thread@HxTelemetry_obj@hxtelemetry@@QAEHXZ)
a060308a_CppHxTelemetry.obj : error LNK2001: unresolved external symbol "int __cdecl __hxcpp_hxt_start_telemetry(bool,bool)" (?__hxcpp_hxt_start_telemetry@@YAH_N0@Z)
a060308a_HxTelemetry.obj : error LNK2019: unresolved external symbol "void __cdecl __hxcpp_hxt_ignore_allocs(int)" (?__hxcpp_hxt_ignore_allocs@@YAXH@Z) referenced in function "public: static void __cdecl hxtelemetry::HxTelemetry_obj::disable_alloc_tracking(bool)" (?disable_alloc_tracking@HxTelemetry_obj@hxtelemetry@@SAX_N@Z)
a060308a_CppHxTelemetry.obj : error LNK2001: unresolved external symbol "void __cdecl __hxcpp_hxt_ignore_allocs(int)" (?__hxcpp_hxt_ignore_allocs@@YAXH@Z)
a060308a_CppHxTelemetry.obj : error LNK2019: unresolved external symbol "void __cdecl __hxcpp_hxt_stash_telemetry(void)" (?__hxcpp_hxt_stash_telemetry@@YAXXZ) referenced in function "public: static void __cdecl hxtelemetry::CppHxTelemetry_obj::do_advance_frame(class hx::ObjectPtr<class hxtelemetry::HxTelemetry_obj>)" (?do_advance_frame@CppHxTelemetry_obj@hxtelemetry@@SAXV?$ObjectPtr@VHxTelemetry_obj@hxtelemetry@@@hx@@@Z)
a060308a_CppHxTelemetry.obj : error LNK2019: unresolved external symbol "struct TelemetryFrame * __cdecl __hxcpp_hxt_dump_telemetry(int)" (?__hxcpp_hxt_dump_telemetry@@YAPAUTelemetryFrame@@H@Z) referenced in function "public: static void __cdecl hxtelemetry::CppHxTelemetry_obj::dump_telemetry_frame(int,class hx::ObjectPtr<class haxe::io::Output_obj>,class Dynamic)" (?dump_telemetry_frame@CppHxTelemetry_obj@hxtelemetry@@SAXHV?$ObjectPtr@VOutput_obj@io@haxe@@@hx@@VDynamic@@@Z) ApplicationMain.exe : fatal error LNK1120: 4 unresolved externals
Error: error running link.exe -out:ApplicationMain.exe -nologo -machine:x86 -subsystem:windows,5.01 -libpath:lib user32.lib @obj/msvc18-ncxp/all_objs ws2_32.lib

I have checked and missing functions are defined in hxcpp Telmetry.cpp file but it is not linked. Is there any way to fix this?

jcward commented 7 years ago

Hmm, @hughsando recently refactored the debug / telemetry / profiler stuff in hxcpp git, maybe he can help. Here's a compiler output from linux. It looks like it has the telemetry defines and the Telemetry.cpp source is being compiled, so why is link failing?

http://hastebin.com/ewavidigow.vbs

synek317 commented 7 years ago

@jcward I am very new to haxe but maybe it is because there are two Telemetry obj files? As far as I know, one comes from hxcpp and one from openfl.