Linux HXCPP issue during compile


I am currently getting the error while compiling:

Error: ./src/cpp/Prime.cpp: In static member function ‘static Dynamic cpp::Prime_obj::_loadPrime(String, String, String, hx::Null)’:
./src/cpp/Prime.cpp:33:46: error: ‘class String’ has no member named ‘utf8_str’; did you mean ‘c_str’?
HXLINE( 40) const char* this1 = signature.utf8_str();

I am not sure of the origin of the error, but I am compiling against openfl using Haxe 4.0-rc2 and all the latest libraries from haxelib. I did run openfl setup linux and installed all the recommended files. This does work on other OS’s. Am I missing a library perhaps that I need to install?


That part should work on all os, do you have the same version of haxe, openfl and hxcpp on both?

I checked and I am running the same latest version of haxe rc2 and openfl and hxcpp on all the machines.

OpenFL: 8.9.1
HXCPP: 4.0.8
Haxe: 4.0.0-rc.2

The problem is reported in the file “src/cpp/Prime.cpp”

Sounds like a bug then, you should report it

1 Like

Will do, thanks!

Happening for me, too on 4.0.0-rc.3+e3df7a4

Sorry, I had an old hxcpp version installed, updating to latest version fixed the problem.

haxelib install hxcpp