Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 25
We don't really know if code on SL is compiled in the same sandbox environment as it is executed, but here are some attempts at using std::filesystem to look for stuff which may help identify what libraries are available in the sandbox. I don't think it answers the question, but it could be a good start. https://code.sololearn.com/ca6a14A80a20/?ref=app
3rd Feb 2021, 2:01 PM
Hatsy Rei
Hatsy Rei - avatar
+ 6
Instead of recompiling you can also dynamically load the needed libraries like in this code https://code.sololearn.com/cicWjI025511/?ref=app
4th Feb 2021, 4:13 AM
Volodymyr Chelnokov
Volodymyr Chelnokov - avatar
+ 5
(try to use SFML or SDL or Allegro in code playground)
3rd Feb 2021, 1:22 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 4
‎   ‎ dynamic loading in C++ can still work if you declare all the __libc functions as extern "C" to prevent name mangling, and explicitly cast void* to the corresponding function types. I attach your sqlite3 code modified to use dynamic loading https://code.sololearn.com/cKHjpMO686UT/?ref=app
4th Feb 2021, 9:34 AM
Volodymyr Chelnokov
Volodymyr Chelnokov - avatar
+ 2
I never knew C++ had libraries available in sl🤔
3rd Feb 2021, 12:33 PM
Jsçk~⚂
Jsçk~⚂ - avatar
+ 1
‎   ‎ Thanks for the explanation! i should probably stop talking here since I'm not answering
4th Feb 2021, 11:23 AM
Jsçk~⚂
Jsçk~⚂ - avatar
0
<stdlib.h>//useful for working with the machine <math.h>//Useful for math <string.h>//Useful to handle chains
4th Feb 2021, 5:24 AM
Daniel Briceño
Daniel Briceño - avatar