kevinw / raylib-odin

Odin bindings for the raylib gamedev library
The Unlicense
38 stars 4 forks source link

Unable to rebuild the bindings [win10 x64 mscv] #11

Open erpeo93 opened 4 years ago

erpeo93 commented 4 years ago

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

kevinw commented 4 years ago

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 commented 4 years ago

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.

erpeo93 commented 4 years ago

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?

kevinw commented 4 years ago

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.