Thread: Displaying an image file

  1. #1
    Registered User
    Join Date
    Jun 2023
    Posts
    3

    Displaying an image file

    The code I wish to implement requires an include.

    #include <SDL2/SDL.h>

    Running https://packages.msys2.org/base/mingw-w64-SDL2

    indicates the files that can be down loaded, viz:






    I am working on a 64 bit windows box, with W10 installed.

    Which of the SDL2 files should I download?

  2. #2
    Registered User
    Join Date
    Dec 2017
    Posts
    1,633
    Probably mingw-w64-x86_64-SDL2
    A little inaccuracy saves tons of explanation. - H.H. Munro

  3. #3
    Registered User
    Join Date
    Jun 2023
    Posts
    3
    Thank you John.c, could you please help me more to fid the header file <SDL2/SDL.h>?
    Last edited by Patrick149; 01-23-2024 at 02:15 PM.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Scroll down to where is says "Files:"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    The OP needs to know that the compiled packages are designed to be ran under the MSys2 MinGW environments.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  6. #6
    Registered User
    Join Date
    Dec 2017
    Posts
    1,633
    Quote Originally Posted by stahta01 View Post
    The OP needs to know that the compiled packages are designed to be ran under the MSys2 MinGW environments.
    That's a good point. I'm assuming he is using mingw. As long as he installed it with the package manager #include <SDL/SDL.h> should work fine.
    A little inaccuracy saves tons of explanation. - H.H. Munro

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Displaying in image file
    By george7378 in forum C++ Programming
    Replies: 6
    Last Post: 02-21-2011, 02:32 AM
  2. displaying image
    By sgh in forum C# Programming
    Replies: 2
    Last Post: 03-17-2009, 07:22 AM
  3. Displaying an Image
    By evanman in forum C++ Programming
    Replies: 3
    Last Post: 07-07-2006, 01:04 PM
  4. Displaying a PNG image
    By grep in forum Windows Programming
    Replies: 5
    Last Post: 07-07-2005, 08:27 PM
  5. Image displaying
    By homeyg in forum C++ Programming
    Replies: 16
    Last Post: 01-03-2005, 06:27 PM

Tags for this Thread