- Created Thursday, January 7th 2016 @ 01:58:10
Hey, I've been greatly enjoying your site recently, but I've come across a few problems when trying to compile bots that use math.h; The library needs to be explicitly linked with '-lm' when compiling.
It's a small detail, but it means everyone who uses C needs to roll their own versions of sqrt(), log(), sin(), etc.
Granted, thats about the only issue I've come across that makes me wish I could do this, but it's still a pretty glaring one. One way to get around might be to send a makefile along with the bot, but I'm sure that carries along it's own host of issues...
Anyways, thanks for the site!
- Created Monday, March 21st 2016 @ 14:09:08
i encountered this problem as well. As math.h and sys/time.h are supposedly frequently used libraries, is it possible to adapt the compiler flags for C, C++?
DeveloperCreated Monday, March 21st 2016 @ 14:16:26
Apparently I've missed the first post, but I'll add it to my TODO list :)
DeveloperCreated Tuesday, March 22nd 2016 @ 14:45:52
I've updated the script. The -lm flag is now at the end of the line, which should include math.h correctly this time. The sys/time.h library should be linked automatically as far as I know.