Install SDL in Ubuntu

Source: Internet
Author: User
Due to work needs, we need to develop a Demo program under Meego, combined with our touch screen, for demonstration to the customer. There was already a software for windows that imitates the Iphone. The effect was quite good. You can use your fingers to draw pictures and play a virtual piano on your computer screen, so this time we transplanted this program to Meego. Since the Meego kernel is a standard kernel, it is not as abnormal as Android, so after compilation on my Ubuntu, copy it with the library file, and you can run it directly. The effect remains to be verified!

Due to work needs, we need to develop a Demo program under Meego, combined with our touch screen, for demonstration to the customer. There was already a software for windows that imitates the Iphone. The effect was quite good. You can use your fingers to draw pictures and play a virtual piano on your computer screen, so this time we transplanted this program to Meego. Since the Meego kernel is a standard kernel, it is not as abnormal as Android, so after compilation on my Ubuntu, copy it with the library file, and you can run it directly. The effect remains to be verified!

SDL is short for Simple DirectMedia Layer (Simple direct control media Layer. It is a cross-platform multi-media library used to directly control the underlying multimedia hardware interfaces. It is mainly used for game development!

Ubuntu's new establishment already contains the SDL library, so you can install it by using a few simple commands, which is more stupid than windows!

Sudo apt-get install libsdl1.2-dev (relatively large, about 10 MB)

Additional package:

Sudo apt-get install libsdl-image1.2-dev

Sudo apt-get install libsdl-mixer1.2-dev

Sudo apt-get install libsdl-ttf2.0-dev

Sudo apt-get install libsdl-gfx1.2-dev

After the installation is complete, an SDL folder in the directory/usr/include contains the required header file.

Write the simplest program to test whether the environment is OK:

Compile and run:

Note: The symbol on the configuration option is not a single quotation mark, but the one on the TAB key.

Haha, OK!

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.