Error compiling TransformActuator on C++

Hello @singmajesty,

It has to get “error”

Error: TransformActuator.cpp
./src/motion/actuators/TransformActuator.cpp(94): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(94): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(103): error C2664: ‘Dynamic hx::Object::__SetItem(int,Dynamic)’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(103): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(114): error C2664: ‘Dynamic hx::Object::__SetItem(int,Dynamic)’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(114): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(190): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(190): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(200): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(200): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(208): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(208): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(224): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(224): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(234): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(234): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(253): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(253): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(262): error C2664: ‘Dynamic hx::Object::__SetItem(int,Dynamic)’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(262): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(271): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(271): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(280): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(280): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(313): error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(313): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(322): error C2664: ‘Dynamic hx::Object::__SetItem(int,Dynamic)’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(322): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
./src/motion/actuators/TransformActuator.cpp(333): error C2664: ‘Dynamic hx::Object::__SetItem(int,Dynamic)’: cannot convert argument 1 from ‘String’ to ‘int’
./src/motion/actuators/TransformActuator.cpp(333): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

My dear god! I have already upgraded version of Lime and Openfl than it has error. Please check under Windows 10 x64 Versions

I already installed Visual Studio 2015 / 2017 Community

I’ve never seen this error before. What version of Haxe are you using? Is your version of HXCPP current?

Yes I say that:

Haxe 3,4,2
HXCPP 3,4,64
Lime 5,1,0
Openfl 5,1,3

Thanks! What is your current version if you don’t get errors?

I have same setup on Windows 10 x64 and everything compiles fine. I’ve had a problem with VS 2017 so I needed to uninstall it and install VS 2015. They’ve changed a lot of things in VS 2017 which broke compatibility with VS 2015 compile scripts, I checked few days ago and there was discussion about this on HXCPP Github, HXCPP wasn’t compatible with VS 2017 yet.

Anyway, try to rebuild your project completely and see if it helps, seems like declarations in generated cpp files are messed up.

It is really impossible - I already check lime rebuild windows -static -32 into successful and it has not errors.
And my hxcpp has not problem with VS 2017 yet. I think TransformActuator.cpp has many wrong hx files like class types like openfl has always errors who forget to check before Float32Array, … Uint32Array, …?

Please check older version of Openfl non error. It means all libraries like Float32Array, Int32Array, Uint32Array etc… error C2664: ‘Dynamic hx::Object::__GetItem(int) const’: cannot convert argument 1 from ‘String’ to ‘int’ likes wrong class type was generated by hx to cpp and it gets error if class conflicts…

Thanks

Does it work if it’s not static?

I found because actuate is incompatible. That is why we need to send to report developer of actuate.

I say so that. OpenFL, Lime and HXCPP works fine 100 % actuate has wrong types because it is old for new version Openfl / lime. You can check actuate ( latest version is 1.8.7 )
I tried to upgrade but actuate has not next release.

// EDIT:
I found because actuate works but I didn’t change cpp. impossible maybe haxe write wrong to cpp
and I tried to remove and to re install and it works fine Thanks! Resolve now!

1 Like