Skip to content

How to switch import library by platform #3438

Discussion options

You must be logged in to vote

I did it.
Files easings.odin and rlgl.odin in same folder(vendor:raylib) were cause of error.
To add //+build windows easings.odin and rlgl.odin,the above build tags approach is working correctly.

This is my final approach.I choose file suffixes approach.

game project.

odingame/
 ├ dist/
 ├ lib/
         ├ raylib
                 ├ raylib_wasm.odin     // copied from https://github.com/Caedo/raylib_wasm_odin
                 ├ raylib_windows.odin     // copied from vendor:raylib
                 ├ easings_windows.odin     // copied from vendor:raylib
                 └ rlgl_windows.odin     // copied from vendor:raylib
 ├ src/
 │ └ main.odin

main.odin

import rl   "../lib/raylib"      //

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Sticky-fingerz
Comment options

@Sticky-fingerz
Comment options

@Sticky-fingerz
Comment options

Answer selected by Sticky-fingerz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants