step1: #include <iostream> #include <vector> #include <string> using namespace std; main() { vector<string> SS; SS.push_back("The number is 10"); SS.push_back("The number is 20"); SS.push_back("The number i
今天在虚拟机上用GCC编译一个程序的时候,出现了下面的错误: make: warning: Clock skew detected. Your build may be incomplete 试了make clean后再make,仍然是同样的问题,最后发现这个错误的原因在于系统时间比文件修改时间早,看了下我的系统时间竟然还是2012-01-13,而今天都已经是2012-01-31呢,于是修改时间后重新编译,问题解决. Linux下用date命令可查询和修改系统时间(root权限才可修改) dat
1. GNU 上关于LIBRARY_PATH的说明: LIBRARY_PATH The value of LIBRARY_PATH is a colon-separated list of directories, much like PATH. When configured as a native compiler, GCC tries the directories thus specified when searching for special linker files, if it
原文:gcc编译与gdb调试简要步骤 一.Linux程序gcc编译步骤: Gcc编译过程主要的4个阶段: l 预处理阶段,完成宏定义和include文件展开等工作:(.i) l 根据编译参数进行不同程度的优化,编译成汇编代码(.s.S) l 用汇编器把汇编代码进一步生成目标代码(.o) l 用连接器把生成的目标代码和系统或用户提供的库连接起来,生成可执行文件 格式: l gcc -E test.c//预处理阶段 l Gcc -S test.c//编译阶段 l Gcc -c test.c//汇编阶