Linux Project Development

Source: Internet
Author: User
Linux program development-general LINUX technology-Linux programming and kernel information. Original Author jarod.1

I always wanted to use Linux and installed it many times. I always used windows again after a while. In fact, I kept thinking that my child will be able to use linux from the very beginning, long live sharing.

In this project, I used fedora as the OS in the original project, and my job was to do the navigation software. Of course, I started from matlab and then switched to C code, however, I am still worried about whether the compiled results of GCC are different from those of other C compiler, which leads to a difference in computing accuracy. After completing the C code simulation, to ask the Boss, you need to test it in fedora. Well, we finally have to use linux.

In fact, I installed fedora 8 once on an NB, which damaged the system recovery function of NB. It took a long time to install a system. After multiple backups, fedora 5 (the version used by the other company) is installed ).

LINUX Project Development

1. project preparation: the file name to be compiled is suffixed *. cc, because the previous files are lazy and only use ansi c, and do not use C ++, convert them into C ++: Put all macro definitions and variable declaration header files in *. h, the initialization content is thrown into the class function. I don't know if there is any better method. The array initialization can only be initialized one by one, and A [] = {1, 2, 3 ,..} but what if A [10] [10? There is not much time to think about, so let's leave it for now; the variables and structures to be output should be put into public, other variables should be put into private, and all the columns used in function declaration should be put in the end; throw all functions used *. cc, and add the class Name: Before the function name, the conversion is basically successful. The following is the test file. Declare the instance p, struct instance st of the defined class, and then call the p. st. variable.

2. GCC Compilation:

The compilation of makefile is how to compile the project and generate the project. Input: make to generate test. o and input:./test to run the command. It's that simple. I used gedit to edit the file. When an error is reported, I can use ctrl + 'I' to find the row.

3. GCC debugging:

GCC does not have a breakpoint. Maybe I don't know. debugging can only be monitored using output commands. These have been done many years ago when I was a mcu. Naturally, I am not familiar with it. However, there are many commands such as printf and cout, so I don't care too much about which one is familiar to me.

There is also the display of data, matlab is not available, only free gnuplot, again: Sharing Long live! Gnuplot is installed like this: *. tar: run: tar-zxvf gnuplot-4.0.0.tar.gz and then./configure and then make the last make install. Usage: first find the data path and enter gnuplot to display gnuplot> enter plot 'filename' u 1 (colum) with linespoint. The plot can be analyzed, and gnuplot does not have the zoom-in function. After the zoom-in, you can only re-paint it with reset.

Until yesterday, I finally gave the other party a software version of 1.2 and waited for the result of their sports car. If it's okay, we need to build GPS generater again.

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.