In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
C program compilation under linux system:
Gcc-Wall-g-o tfP tfP.c
Option description:
-Wall represents that the compiler will output warning messages (Warning) during compilation, such as some variables you do not use, the wrong type of pointer, and the main function does not return an integer value.
Although this kind of information is not an error and does not affect compilation, it is likely to be the source of the program bug, and it also helps you to find errors in the code and standardize the code format. Therefore, it is recommended that you add the-Wall parameter every time you compile.
-g means the compiler will collect debug information so that if your program goes wrong, you can debug it line by line through tools such as gdb or lldb to find out the cause of the error. If you are not 100% sure that there is nothing wrong with your program, it is recommended to add the-g parameter. In this way, debug will be much more convenient.
-o represents that the compiler will output the compiled executable to the folder you specify with the name you specify. The name after the space of-o is the name of the output file.
For example:-o is followed by test, which means that gcc will generate an executable file called test in my current directory after compilation is successful. Without this parameter, the executable file generated after each compilation will be placed in the root directory, called a.out. Each successful compilation will overwrite the last a.out file. Therefore, it is recommended to add the-o parameter, which can be more organized.
These are the details of how to compile c language in linux. Please pay more attention to other related articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.