• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0

How to install GCC

3 posts in this topic

I just got a new book about C and I am excited to learn the language that is used in most games, but the book says I need to install GCC. I found the GCC website, but it doesn't seem to have any download link anywhere. The only link it has leads to cygwin.com, and I don't see how that is related to C. Can anyone give me the link to download GCC for windows?


Share this post

Link to post
Share on other sites

MinGW and MinGW-w64 are both mighty fine compilers which differ mainly in their implementations of the CRT and in support of newer features. MinGW-w64 has a much more up-to-date and complete API and is much more aggressively developed. The original MinGW, on the other hand, is more mature, and has a rather "conservative, safe" approach. You may find that one or the other new function isn't in the API, but usually you will not notice anything missing.


Note that MinGW-w64 is not necessarily only able to produce 64bit executables for 64bit Windows, even if the name may lead you to believe that. It produces 32-bit executables just fine (there exist 32bit-only builds and builds that can do both 32 and 64, depending on what commandline option you give to it).


The hardest bit is probably choosing which one to use, since there are so many versions and builds. It's a bit like being in a candy shop rolleyes.gif


I would recommend a 32bit-only gcc-4.8 build with SJLJ exceptions to start with (for example the TDM32 package). The generated executables run on any system, there's not much you can do wrong, and you do not have any obscure problems lurking (such as with DW2 exceptions). Version 4.8 has a good support of C++11 and is reasonably stable and bug-free. The generated code is up to par with the best available compilers.


Cygwin is something I wouldn't recommend, for two reasons. The less important reason is that it doesn't do what most people want. Most people actually don't want a complete POSIX emulation layer on top of Win32 (even more so as some things like fork do not map to Windows well at all!). The more important reason is, however, that the standard libraries you link with are under the GPL. Which means that any programs you write are necessarily under the GPL too. Free software is great, and if you never intend to write anything but free software, being bound to the GPL is no problem -- but most people will eventually discover that they have to eat and pay bills, too.


Using MinGW, on the other hand, the compiler is under the GPL (as well as the profiling lib), but the executables that come out are licensed any way you want. The standard library is technically under the GPL too, but there is a license clause that exempts you from the obligations.


Share this post

Link to post
Share on other sites

I just got a new book about C and I am excited to learn the language that is used in most games, but the book says I need to install GCC. I found the GCC website, but it doesn't seem to have any download link anywhere. The only link it has leads to cygwin.com, and I don't see how that is related to C. Can anyone give me the link to download GCC for windows?

I am happy to see you have found a strong interest in learning a new language.


One final addendum: C is hardly used in games anymore; it tends to be the language of the lower-level kernel hackers. C++, however, is still widely used. C# also is making a strong showing, and if you go that route then Visual Studio is a good choice as it supports both C++ and C#.

What JTippetts says is true. However, I feel it is still important to learn the C programming language as it gives you an appreciation, if not a better understanding of what goes on in higher level languages like C++ and C#.  Also, by understanding the differences between a low, mid and high level language, you have the needed awareness of what to be cautious about in programming high level applications (such as some games). C++ is, in my opinion, one of the most powerful languages around. This is essentially because C++ can be used in a C like low level paradigms or in a C# like high level paradigm. But with that power, comes the dangerous practice of mixing a low level and high level paradigm in a single application. This should be avoided. Not knowing the difference could get you in a lot of trouble, which recaps why I feel you should learn C.
Also, remember that since C++ is backwards compatible to C, you could simply install a C++ compiler, its libraries, and an IDE to support it while still learn C through use of it.

Or you can download Visual Studio, like JTippets suggested, which is probably the better option! Note: By "Express version" of Visual Studio, that doesn't mean it's limited or useless or slimmed down. It's fully functional with everything you need - including if you later want to sell your programs commercially.

What Servant of the Lord refers to is also correct and vitally important. As novice programmers, many people tend to not realize the vital importance of understanding the complexity behind copy right laws, and where copy left laws associate. It is important to understand the clear definition of what GNU means, and how it applies to anything you create. For more reading, see here: http://en.wikipedia.org/wiki/GNU_General_Public_License
Now, all methods of setting up your IDE listed from Servant of the Lord and JTippetts are correct and are very useful. But both methods will also come with the proprietary development of Windows programming (some exceptions with Qt and Cygwin). Assuming that you one day wish to expand to other operating systems, another option for you is to use the Eclipse IDE. For right now, I would avoid using it in Windows as it requires some greater knowledge in configuring it with a C++ compiler. However, when you do feel ready, it can be setup to use MinGW, Cygwin, Linux/UNIX or the same compiler used by Visual Studios! And because Eclipse is not GNU licensed, you could also program on a Mac and still sell the game!


If you want to get a feel for how it works in a different OS environment, you could do it by simply following the below steps:


1.Download/Install the Oracle VM here: https://www.virtualbox.org/

2.Download CentOS here: http://www.centos.org/

3.Run Oracle VM and install the CentOS in a virtual environment. Here's a tutorial on installing CentOS:


NOTE: When installing CentOS, choose the prepackage option (step 19 on the tutorial) of a Software Development Workstation.

4.Run the OS, Log in, and start the Eclipse IDE (The Linux C/C++ compiler is already configured for you).

5.Follow the steps normally taken in creating a C++ project, and start coding away. 

NOTE: 3D programming may require additional Linux RPMs and may not run properly in a VM environment. Additionally, 3D programming frameworks associating to DirectX and Direct3D will not work on Linux without WINE bindings. Finally, when you develop using Eclipse on a Mac, you'll be using a different compiler, which may require a manual configuration in the Eclipse IDE.


To make full use of my recommendation, learn how to use preprocessor directives, and make your code very efficient for cross-platform execution (an advantage of learning C). The preprocessor directives can judgement whether to use Direct3D or OpenGL based on which compiler is detected. In essence, a solid application will only need to be compiled multiple times between different compilers generating multiple executables. Thus, all you would do is create a script that decides which executable to run based on which operating system is detected and you have a cross-platform package with multiple executable that were compiled with absolutely no coding differences.

Edited by Subtle_Wonders

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0