Skip to content
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

Linux version doesn't link to libm for math.odin #44

Closed
ghost opened this issue Apr 25, 2017 · 4 comments
Closed

Linux version doesn't link to libm for math.odin #44

ghost opened this issue Apr 25, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 25, 2017

I solved it by directly inserting -lm to this line: https://github.com/gingerBill/Odin/blob/a80872b/src/main.c#L433

@alichay
Copy link
Contributor

alichay commented Apr 26, 2017

Why does it need to?
What functions in use are a part of libm?

If you can list what needs libm in compilation, then this will be a quick fix, as the proper way to solve this is to have something like this in the offending file:

#foreign_system_library libm "m";
my_libm_proc :: proc() #foreign libm;

@ghost
Copy link
Author

ghost commented Apr 26, 2017

What functions in use are a part of libm?

sin, cos, tan

@gingerBill
Copy link
Member

I'm adding it to the next commit. However, I hope to remove the explicit need for it later.

@ghost
Copy link
Author

ghost commented Apr 26, 2017

@gingerBill thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants