Closed alfie-nsugh closed 3 years ago
@alfie-nsugh This language is very young so you cant do it. If you still want to do it somehow then run the following command
~/Peregrine/Peregrine/peregrine compile test.pe -emit-c
Then compile the c code generated using the following command
gcc temp.c -lSDL2 -lSDL2_image -o test
That works thanks!
Is your feature request related to a problem? Please describe. I wanted to use Peregrine instead of C to write sdl2 code, but I could not find a way to include libraries I tried to when compiling to add the -lSDL2 and the -lSDL2_image flag but that didn't work, so I thought that would be a nice feature to include.
Describe the solution you'd like I would like to have in the peregrine compiler to have the option to include external libraries like SDL2 and SDL2_image and SDL2_ttf
Describe alternatives you've considered I honestly don't know of any other alternative methods outside of allowing -l flags
Additional context Add any other context or screenshots about the feature request here. This was what I wanted to compile which I compiled using:
~/Peregrine/Peregrine/peregrine compile test.pe -lSDL2 -lSDL2_image -o test