Skip to content
Sign upLog in
← Back to Community

Can you Open a Window in repl.it?

Profile icon
piepiepie45

So I was thinking of making a quick 2d C++ game using SFML in repl.it to test the capabilities of it (like performance) but to make games with SFML you need to make a window appear. This is totally possible with a normal text-editor/IDE but I was wondering if it was even possible to open a window with repl.it?

Answered by Highwayman [earned 5 cycles]
View Answer
Voters
Profile icon
MattB-05
Profile icon
MichalG4
Profile icon
piepiepie45
Comments
hotnewtop
Profile icon
realTronsi

it is not possible. Repl has its own graphics system but unfortunately libraries such as SFML is not supported. For example try importing and using windows.h and you will see

Profile icon
Highwayman

windows.h won't work because repl.it is a UNIX-like environment, not a windows environment. regardless, you still have a valid point: Graphics are pretty hard to get working on repl.it.

@realTronsi

@piepiepie45
, In order to get SFML working on Repl.it, you need to download and compile the actual SFML library yourself, and even then it won't work if you don't have the hacker plan.
AFAIK, there are other ways of getting graphics on Repl.it with C/C++, but they are kinda annoying

Profile icon
piepiepie45

@Highwayman
Ah, makes sense. Yeah I didn't really need to use repl.it for this (usually use VS or VScode) but I was just wondering.

Thanks for answering!

Profile icon
Coder100

why don't you
https://tryitands.ee

spoiler alert yes it is possible i have done it before