Build a 64-bit C Language Development Environment Using Solaris

Source: Internet
Author: User

When I first came to the company, the company's C program was still 32-bit. Later, I read some documents and thought that 64-bit programs are the real trend, so I started to develop 64-bit programs. This article describes how to build a 64-bit C Language Development Environment under Solaris. I hope to help you.

(1) gcc

Solaris/usr/sfw/bin/gcc can be used to compile 64-bit C Programs, but the-m64 compilation option needs to be added. In addition, you can download the gcc source code from the gcc official website and compile and install it on your own. However, you must note that the compiled gcc must be 64-bit.

(2) gdb

64-bit gdb is required to debug 64-bit C programs. The installation steps of gdb are as follows (version 7.6 is used as an example ):

1) gunzip gdb-7.6.tar.gz
2) tar xvf gdb-7.6.tar
3) cd gdb-7.6
4) export CC = "/usr/sfw/bin/gcc-m64"
5)./configure-prefix = "/… /... (A folder path )"
6) make
7) make install


Note that the latest version of gdb is 7.7, and there is an error in compiling it under Solaris. The solution is also very simple. You can refer to this article.

(3) References

I personally think that Oracle's Solaris 64-bit Developer's Guide is the best material for developing 64-bit C Programs under Solaris. Every C language developer should take a look and I believe it will benefit a lot.

Solaris 64-bit Developer's Guide PDF download:

Free in http://linux.bkjia.com/

The username and password are both www.bkjia.com

The specific download directory is available in/July 6,/July 15,/Solaris to build a 64-bit C language development environment.

For the download method, see

  • 1
  • 2
  • Next Page

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.