Blank Window on MacOSX

I wrote a program in C that has to display an image in a window. I use for that SDL 1.2 (being at an engineering school, I have that constraint). The code compiles and gets executed but display a blank window instead of the image. The program in itself is correct because it works on any linux distro. Would anyone happen to now if that has something to do with Cocoa, XQuartz or OpenGL? If so (or not), what is the problem and how to solve it? Thank you in advance for your time and response.

PS: I can provide the code if needed

Are you polling for events? I believe this is essential in MacOS (with SDL2 anyway, I don’t know about SDL 1.2). See for example here.

I didn’t try that actually, because in the scope of this “exercise”, I must respect a certain structure in the code, which is given to me. But I will sure try it!

The event is polled, but still I get a blanck window (meaning the image is not displayed)