[C Entry, c Entry

Source: Internet
Author: User

[C Entry, c Entry

The code for this series of notes is encoded and tested under Ubuntu 14.04 for no reason, because my laptop only has one Ubuntu system, the only third-party library SDL used is open-source and cross-platform. So even if you are using Windows or Mac, you can run all the code.

 

1. Install the SDL library and its extension

Ubuntu:

Sudo apt-get install libsdl2-devsudo apt-get install libsdl2-gfx-devsudo apt-get install libsdl2-image-devsudo apt-get install libsdl2-mixer-devsudo apt-get install libsdl2-net-devsudo apt-get install libsdl2-ttf-dev

Windows or Mac can be downloaded and installed on the SDL official website.

Note the differences between SDL versions 1 and 2. download the latest version 2.

After installing Ubuntu, all the SDL header files are under the/usr/include/SDL2/directory. Therefore, the header file format in my code is # include <SDL2/SDL. h> or <SDL2/SDL_ttf.h>. If you are not Ubuntu, set the header file location correctly.

 

2. Install the integrated development environment

Any text editor. I use Code: Blocks. If you are not good at writing Makefile, we recommend using it. This sentence can be ignored directly if Makefile is used.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.