Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Compiler/IDE for SDL+C++ with Ubuntu and Windows

  1. #1
    Join Date
    May 2012
    Beans
    10

    Talking Compiler/IDE for SDL+C++ with Ubuntu and Windows

    Hey, i would like to make games for Ubuntu and Windows, so i choose SDL that can run in many platform and C++ as the main language.

    The problem's i'm don't know which compiler/IDE that the best for working with SDL. In Windows, i use MinGW, but, mingw can't compile it to *.deb isn't it?
    So, when i take a look Code::Blocks, that run in Windows, and available in Ubuntu too. I have both of them, but, i don't know how to setting SDL in Code::Blocks, and then i follow the instruction in Lazyfoo(the tutorial only available code::blocks for windows). And the result, the linker not found.

    well, my reason to this question is : i want to distribute the game in both Operating system

    so, i would like to ask :
    1. Which IDE is the best to working with SDL in Ubuntu?
    2. Is the IDE can compile into *.exe and .deb?

  2. #2
    Join Date
    Aug 2007
    Beans
    190
    Distro
    Ubuntu

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    The problem's i'm don't know which compiler/IDE that the best for working with SDL. In Windows, i use MinGW, but, mingw can't compile it to *.deb isn't it?
    You're confusing the output of the compilation process with the .deb package format. See for more info here:

    http://developer.ubuntu.com/packaging/html/

    I have both of them, but, i don't know how to setting SDL in Code::Blocks, and then i follow the instruction in Lazyfoo(the tutorial only available code::blocks for windows). And the result, the linker not found.
    It happen that I have Code::Blocks too installed and guess what - it offers you the possibility to directly make a SDL project. I never worked with it (don't know why it is installed on my machine) but I guess that in order to use the SDL project option you have to have the (libsdl??) proper libraries and header files installed on your machine. Just use synaptic and pull it up from repositories - don't go on the SDL website and take the last version since it is not 100 % compatible with some current games. I found out on my own, because I didn't bother to spent 5 minutes to read about it, before installing it.

    1. Pretty much every IDE will work, assuming you can correctly configure to link your stuff with sdl libraries.
    2. Nope - read the link above and then read the manpages for gcc and ld. Go and read the reference manual for gcc also (http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/), especially the part that says options for linking.

  3. #3
    Join Date
    May 2012
    Beans
    10

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    Quote Originally Posted by PeterP24 View Post
    You're confusing the output of the compilation process with the .deb package format. See for more info here:

    http://developer.ubuntu.com/packaging/html/



    It happen that I have Code::Blocks too installed and guess what - it offers you the possibility to directly make a SDL project. I never worked with it (don't know why it is installed on my machine) but I guess that in order to use the SDL project option you have to have the (libsdl??) proper libraries and header files installed on your machine. Just use synaptic and pull it up from repositories - don't go on the SDL website and take the last version since it is not 100 % compatible with some current games. I found out on my own, because I didn't bother to spent 5 minutes to read about it, before installing it.

    1. Pretty much every IDE will work, assuming you can correctly configure to link your stuff with sdl libraries.
    2. Nope - read the link above and then read the manpages for gcc and ld. Go and read the reference manual for gcc also (http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/), especially the part that says options for linking.
    but, how to find the correct sdl to use? i'm using ubuntu 12.04.
    1. Is code::blocks in ubuntu can be use to compile sdl(with *.deb)?(working with it, linking, until .deb)
    2.ah, well, and then can we use the code in code::blocks ubuntu(.deb) and compile it in code::blocks windows(.exe) as well?

    as long the setting of the code::blocks can be configure to use sdl, or i mean is the different of code::blocks in ubuntu and windows is only in the settings and compiler isn't it?
    thx..

  4. #4
    Join Date
    Apr 2012
    Beans
    27

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    You don't compile anything into into a .deb file, .deb, .exe, .dmg etc... are self extracting archives with extra information added do do with the installation path, think of them as advanced .zip files.

    You compile your program first then you package it.

  5. #5
    Join Date
    May 2012
    Beans
    10

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    Quote Originally Posted by Avaritia View Post
    You don't compile anything into into a .deb file, .deb, .exe, .dmg etc... are self extracting archives with extra information added do do with the installation path, think of them as advanced .zip files.

    You compile your program first then you package it.
    hmm, what's the meaning of package? isn't the compile process make the program?

    forgive me, i'm not to understand that

  6. #6
    Join Date
    Aug 2007
    Beans
    190
    Distro
    Ubuntu

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    Quote Originally Posted by vedelumino View Post
    hmm, what's the meaning of package? isn't the compile process make the program?

    forgive me, i'm not to understand that
    Yes you have the program but you need to distribute it. On MSWindows you have to add an installer to your binaries in order to be sure they are copied in the right places, that the registry entries are created, etc, when the user starts the installation process.
    On Debian based systems, you package your programs in .deb files in order to distribute them to the end user. There are exceptions to this rule but - again - read the documentation, especially the first link I gave you in my first post to this thread.

  7. #7
    Join Date
    May 2012
    Beans
    10

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    Wow, it's interesting to developing with .deb , i will read the documentation before asking again.

    For now, Thankyou all for the helps!

  8. #8
    Join Date
    Jun 2005
    Beans
    81

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    You may want to read this information about packaging to get some idea.


  9. #9
    Join Date
    May 2012
    Beans
    10

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    Quote Originally Posted by overcast View Post
    You may want to read this information about packaging to get some idea.
    oh, thankyou
    and now, i have problem with code::blocks and sdl, should i post in this thread?
    this is the error :
    Checking for existence: abcde....(directory of the project)
    Executing:abcde.....(in abcde.......)
    Process terminated with status 255 (0 minutes, 0 seconds)
    what should i do? thx.

  10. #10
    Join Date
    Aug 2007
    Beans
    190
    Distro
    Ubuntu

    Re: Compiler/IDE for SDL+C++ with Ubuntu and Windows

    Quote Originally Posted by vedelumino View Post
    oh, thankyou
    and now, i have problem with code::blocks and sdl, should i post in this thread?
    this is the error :


    what should i do? thx.
    Please give more info - at least something so that we can reproduce your problem.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •