-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example raylib: error on Windows 10 #141
Comments
Natively compiled packages are currently not really supported on Windows, for the reason in the comment you found. That will be addressed at some point when a good solution is found. To get this working for now, you will have to go into the $ onyx run --generate-foreign-info build.onyx That should make a C file in the current directory. You then need to compile that C file using I've never actually done this on Windows, but I believe that should do the trick. Let me know if anything needs clarification. |
Some notes: Then I started $ cd ->\lib\github.com\onyx-lang\pkg-raylib\raylib
$ cl.exe /LD .\onyx_raylib.c .\windows\raylib.lib
$
$ many errors for all referenced functions in raylib:
$ onyx_raylib.obj : error LNK2019: Reference to external symbol "_InitWindow" in function "___onyx_internal_onyx_raylib_InitWindow".
$ ...
$ onyx_raylib.dll : fatal error LNK1120: 499 no solved extern An A lot of C libs offer a dynamic lib for many platforms that could be used to load dynamically and bind to the .dll (.so) from Onyx. In the module.onyx file of raylib pkg there are the C bindings already defined (#foreign block). Why is a separate generation of onyx_raylib.c necessary to include the C lib? Usually a language with C FFI loads a dynamic lib and uses bind coding in the other language to find and call the C functions. |
Tried raylib pkg to install but get following errors.
The project structure and .kdl files seem to be correct.
The text was updated successfully, but these errors were encountered: