Cmake project window output not showing up?


How come my SDL3 cmake project doesn’t have the option for the output tab?
Repl link:

int main(int argc, char *argv[]) {
    //////////////////// This is here because the stuff CMAKE outputs is annoying
	 /**/ doClear(); /**/
	SDL_Window* window;

	vectorTest blah(glm::vec4(1, 6, 2, 4));

	while(true) {
		SDL_Delay(1000 / 60);
	return 0;

Try running neofetch in the shell to make it appear.

1 Like

i do have an output now, but my window isn’t showing up

tried doing audio = true in the .replit file and now I see
I am mad confused rn

Try kill 1, that’s a normal bug

did that a few times before posting, but it only seems to run at startup, but returns the error again when run is used.

Try adding some blank lines, that might make replit happy

I’m not entirely sure what SDL is, but assuming you’re talking about graphics output, it doesn’t work

According to @MattDESTROYER 's close reason for that topic, that was a temporary issue that has been resolved.

1 Like

run button started working again, still cant figure out how to get the window to appear when using neofetch. Dunno why output is acting weird with cmake when it works just fine with a bash compile setup.

Maybe replace cmake with your preferred build system, that might work better.

Wait, it doesn’t seem like you’re drawing anything to the display. That could cause issues

this is what the code currently is
it should theoretically create a window that is just filled with a pure white colour, but its not making a window at all.

Heres an example of what should be appearing (from a separate project where I’ve been working on a game engine using the same library)

I wanted to use CMake for this because the process of compiling and linking .so files is a lot easier than using pure clang, which comes with a lot of frustrations. (a recent example is when I tried using SDL mixer, which is separate from SDL, and the compiler couldn’t find the definitions to functions because it couldn’t link the library properly)

Dunno why bash & cmake templates don’t function the same when it comes to graphical programs (especially when bash isn’t even related to c++), very weird.

Maybe try using GNU autotools, libtool, and pkg-config (those help remove most of the complicated parts). Also, why not gcc/g++?

g++ comes with the same headaches. Personally, the only difference I’ve found is better debugging information (and larger file sizes).

autotools will usually take away headaches from compilers (you just pass library compiler and linker flags that pkg-config provides to it and tell it what source files you want it to create binaries from)

1 Like

I’ll take a look into those, as of now I’ll just assume this is a replit bug for this template or something.

I believe that bug report was one of many related to graphical programs not working, which was because of a temporary issue with Replit’s VNC output window or something along those lines.