godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.71k stars 574 forks source link

SConstruct build error on Windows #308

Closed mdahlgrengadd closed 1 year ago

mdahlgrengadd commented 5 years ago

Getting error when generating bindings

c:\GitHub\gdnative_cpp_example\godot-cpp>scons P=windows bits=64 generate_bindings=yes use_custom_api_file=yes custom_api_file=../api.json
scons: Reading SConscript files ...
  File "C:\GitHub\gdnative_cpp_example\godot-cpp\SConstruct", line 41

    print "Unknown variables:", unknown.keys()

                             ^

SyntaxError: invalid syntax

Commenting out those lines does work, but probably they are important for something else :-)

piiertho commented 5 years ago

Hi there !

If you only want to generate bindings use_custom_api_file=yes custom_api_file=../api.json should not be there. The godot_headers submodule provide a valid one. Use scons godotbinpath="path to your godot executable" platform=windows generate_bindings=yes bits=64 target=release(or debug, depending what you want) instead.

mdahlgrengadd commented 5 years ago

Thanks, but I need the new audio generator API which is not in there yet.

Immac commented 4 years ago

Commenting out those lines does work, but probably they are important for something else :-)

This is because print <arg> is not valid python3 syntax, this works.

image

Zylann commented 4 years ago

Is this still an issue? I can't find the code anymore.

Faless commented 1 year ago

Closing as fixed, since that code seems long gone.