raylib-odin icon indicating copy to clipboard operation
raylib-odin copied to clipboard

Unable to rebuild the bindings [win10 x64 mscv]

Open erpeo93 opened this issue 4 years ago • 4 comments

This is the errors I get from odin when trying to rebuild the bindings:

c:\work\raylib-odin>odin build generator/generate_bindings.odin -out="bin/generate_bindings.exe" && bin\generate_bindings || exit /b 1 c:/work/raylib-odin/generator/bindgen/errors.odin(12:13) Warning: print_err is deprecated: prefer eprint c:/work/raylib-odin/generator/bindgen/errors.odin(38:9) Warning: print_err is deprecated: prefer eprint c:/work/raylib-odin/generator/bindgen/errors.odin(39:9) Warning: print_err is deprecated: prefer eprint c:/work/raylib-odin/generator/bindgen/errors.odin(40:9) Warning: print_err is deprecated: prefer eprint c:/work/raylib-odin/generator/bindgen/errors.odin(41:9) Warning: print_err is deprecated: prefer eprint c:/work/raylib-odin/generator/bindgen/c-parser-evaluate.odin(173:9) Assignment count mismatch '1' = '2' c:/work/raylib-odin/generator/bindgen/c-parser-evaluate.odin(177:9) Assignment count mismatch '1' = '2' c:/work/raylib-odin/generator/bindgen/c-parser.odin(59:20) Cannot take the pointer address of 'options' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(14:13) Cannot assign to 'name' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(35:5) Cannot assign to 'name' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(46:9) Cannot assign to 'structName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(47:9) Cannot assign to 'structName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(48:9) Cannot assign to 'structName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(61:5) Cannot assign to 'enumName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(62:5) Cannot assign to 'enumName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(67:5) Cannot assign to 'valueName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(68:5) Cannot assign to 'valueName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(69:5) Cannot assign to 'valueName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(72:9) Cannot assign to 'valueName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(79:5) Cannot assign to 'functionName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(80:5) Cannot assign to 'functionName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(81:5) Cannot assign to 'functionName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(86:5) Cannot assign to 'defineName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(87:5) Cannot assign to 'defineName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-clean.odin(88:5) Cannot assign to 'defineName' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(26:9) Cannot assign to 'c' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(34:9) Cannot assign to 'c' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(286:17) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(288:21) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(302:17) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(305:21) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(335:17) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(337:21) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(352:17) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(355:21) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator-helpers.odin(373:5) Cannot assign to 'str' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator.odin(75:20) Cannot take the pointer address of 'options' which is a procedure parameter c:/work/raylib-odin/generator/bindgen/generator.odin(77:27) Cannot assign to 'options.parserOptions.enum_args_map' c:/work/raylib-odin/generator/bindgen/generator.odin(83:17) Warning: print_err is deprecated: prefer eprint c:/work/raylib-odin/generator/bindgen/generator.odin(102:17) Warning: print_err is deprecated: prefer eprint c:/work/raylib-odin/generator/bindgen/generator.odin(142:17) Warning: print_err is deprecated: prefer eprint c:/work/raylib-odin/generator/bindgen/generator.odin(208:17) Warning: print_err is deprecated: prefer eprint

erpeo93 avatar May 29 '20 14:05 erpeo93

Odin has changed a bit since I worked on these bindings. I've got the generator fixed up in 84986d7d502f39542a22b6741f45f0ad272b35da but still have some work to do on the generated code, since odin doesn't allow using on file scope imports anymore. Might be a bit.

kevinw avatar May 31 '20 00:05 kevinw

odin run examples\simple_demo and odin run examples\bunnymark works now! Still fixing up the live reload demo, which is the big complicated DLL-boundary crossing one.

kevinw avatar Jun 01 '20 01:06 kevinw

Great! I opened the issue because if some new functionality is added to raylib we would need to rebuild the bindings to get it, right? otherwise that new function won't be usable from odin... I guess?

erpeo93 avatar Jun 01 '20 07:06 erpeo93

You've got it right--this project helps you link to the Raylib libraries, and use the functions in it--and the bindings have to be rebuilt for new functions.

kevinw avatar Jun 01 '20 17:06 kevinw