gcc编译过程 常用指令:#warning/#error/#pragma 环境变量 头文件

本文介绍了Linux下C应用开发的学习方法,强调动手实践和理解系统函数。详细阐述了gcc的编译过程,包括预处理、编译、汇编和链接,并列举了常用预处理指令如#warning、#error。还讨论了环境变量的影响,特别是PATH的配置,并讲解了头文件的使用和查找策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1 Linux下C应用开发学习前言

标准C - 基础,不考虑平台
Unix/Linux下C的开发 - Unix/Linux系统
操作系统: 内存管理、文件/目录管理、进程管理、线程管理、网络支持、信号、IPC进程间通信
学习主要是理论+系统函数,以系统函数应用为主
理论上的东西 尽可能理解,系统函数要求熟练使用。
学习方法:
1 要多花时间和精力,有付出才有收获,付出越多,收获越多。
2 程序员首先做项目,动手是第一位。
3 多问,对自己严格一点。
4 每个月有目标,检测自己是否达到。

计算机的常识(了解)
主流的操作系统:
  Windows系列
  Unix和类Unix操作系统
  安卓 (手机)
  IOS (手机)
  Win phone8(手机)

  Linux系统是一个类Unix系统的内核,GNU项目提供了SHELL,兼容了POSIX标准,同时用 GPL 解决了版权问题。Linux得到了很大的发展。

标准、产品和项目
  标准是行业规范,整个行业都必须遵守。标准无本万利。标准 一般都是 行业协商制定。
  产品是成熟的软件,产品针对的是所有客户,而不是 只考虑特定的群体。对质量的要求更高。
  项目是针对特定客户的,是定制软件。做项目的公司最多,但也是最累的。

程序员找工作的流程:
  写简历(差异化)->被通知笔试(背笔试题)->面试(两轮-人力、技术)->等待


2 gcc的编译过程

gcc的选项:
  -c 只编译,不链接
   -o 指定目标文件名
   -std 指定C标准
  -E 预处理,不编译
  -S 汇编,生成 .s文件
   -Wall 显示更多的警告信息
  -v 查看gcc的版本号。
gcc可以对代码进行预处理、编译、汇编、连接

主流的计算机语言 - 高级语言 转
  汇编语言 转
   机器语言

gcc -E hello.c -ohello.i 预处理的结果
gcc -c hello.c 预处理、编译和汇编
gcc -S hello.c 生成汇编文件
gcc hello.c 包含:预处理、编译、汇编和连接

hello.c
#include <stdio.h>

int main(){
  printf("hello c\n");
//sfasfdafdafdklajfldkaf();
  return 0;
}

3 常用的预处理指令

常用的指令:
#include
#define
条件编译 #if/elif/else/ifdef/ifndef/endif

#warning #error 产生警告 产生错误

#include 后面可以跟 “” 或 <>,区别:
“”包括了当前目录,而 <>不包括

#pragma 可以额外增加一些功能
#pragma GCC dependency 文件名
当前文件依赖于 dependency后面文件,dependency后面文件的最后修改时间比当前文件的晚,就会产生一个警告。

#pragma GCC poison 单词
把poison后面的单词声明为毒药,不能被使用,否则产生错误。

#pragma pack(数字n) 指定对齐/补齐字节数

#include <stdio.h>
#define VERSION 3

#if (VERSION<3)
  #error "版本太低"
#elif (VERSION>3)
  #warning "版本太高"
#endif
//hello.c不能比当前文件新,否则警告
#pragma GCC dependency "hello.c"
#pragma GCC poison goto //定义goto为禁用
#pragma pack(2)//按数字的整数倍对齐和补齐 
int main(){
  //goto ok;//不能再使用goto
  printf("hello c\n");
  ok:printf("goto\n");
  struct s{
      char c1; int i; char c2;
  };
  printf("size=%d\n",sizeof(struct s));
  return 0;
}

4 环境变量

  操作系统在启动后都有一个运行环境,在环境中有很多的变量去控制不同的操作。比如:Path(PATH)叫系统路径,所有可执行程序默认会去系统路径中查找。
  Unix系统由内核和shell组成,shell是连接内核和用户的接口(桥梁)。Unix常用的Shell:
    sh - 最古老的shell,现在不太好用
    csh - 基于C程序员的shell,专业性强
    bash- sh的增强版,常用。

Unix中PATH的配置:(bash下)
配置 登陆目录(~)下的.bashrc文件,vi .bashrc,在最后加上一行
export PATH=$PATH:.
没写错保存退出

生效:source .bashrc 当前窗口生效,或者重启后生效。
echo $PATH 可以打印PATH内容。


5 头文件

头文件写各种声明和各种定义,.c文件写C语言的函数代码。
关于头文件:
1 各种声明和定义写入头文件。
2 找不到头文件会引发致命错误。
3 自定义头文件的写法:
#ifndef XXX_H_
#define XXX_H_

#endif
4 自定义头文件的查找方案:
  a 用 “” 找自定义头文件,支持带路径
  b 把自定义头文件放入系统路径(不建议)
  c 使用gcc -I 头文件所在目录(最通用)
  d 使用环境变量 CPATH
    export CPATH=.

add.h
#ifndef __ADD__H__
#define __ADD__H__
int add(int,int);
double add2(double,double);
#endif //__ADD__H__
add.c
int add(int a,int b){
  return a+b;
}
double add2(double a,double b){
  return a+b;
}
#include <stdio.h>
//#include "add.h"
#include <add.h>

int main(){
  int r = add(2,3);
    double d = add2(1.0,4.0);
    printf("r=%d,d=%lf\n",r,d);
}
Analyzing Interface for Module `J1939stackWrapperUserCbk` +------------------------------------------------------------------------------+ | Generate Driver [J1939stackWrapperUserCbk/J1939stackWrapper_BCL] | +------------------------------------------------------------------------------+ Preparing Address Tables... Generating Source Files... Generating Sourcefiles... ts_src01.c Generating Master and Slave... ts_J1939stackWrapper_BCL_s.h ts_J1939stackWrapper_BCL_s.c ts_J1939stackWrapper_BCL_m.cpp Generating Stubs... Generating Makefile... ts_J1939stackWrapper_BCL.mak Generating test driver succeeded. +------------------------------------------------------------------------------+ | Compile/Link Driver [J1939stackWrapperUserCbk/J1939stackWrapper_BCL] | +------------------------------------------------------------------------------+ ***** Compiling Slave ***** ***** Compiling Usercode ***** ***** Compiling Stubs ***** ***** Compiling Source ***** In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_Cot.h:82:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_Cbk.h:61, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/Source/Stubs/include/Com_J1939MessageCallout.h:23, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:32: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_MemMap.h:58:0: warning: ignoring #pragma section code [-Wunknown-pragmas] # pragma section code "MSR_CODE" /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_Cot.h:346:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_Cbk.h:61, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/Source/Stubs/include/Com_J1939MessageCallout.h:23, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:32: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_MemMap.h:74:0: warning: ignoring #pragma section code [-Wunknown-pragmas] # pragma section code restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_Cbk.h:361:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/Source/Stubs/include/Com_J1939MessageCallout.h:23, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:32: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_MemMap.h:89:0: warning: ignoring #pragma section code [-Wunknown-pragmas] # pragma section code "MSR_CODE" /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_Cbk.h:521:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/Source/Stubs/include/Com_J1939MessageCallout.h:23, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:32: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Com_MemMap.h:105:0: warning: ignoring #pragma section code [-Wunknown-pragmas] # pragma section code restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2308:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:253:0: warning: ignoring #pragma section farrom [-Wunknown-pragmas] # pragma section farrom "MSR_CONST" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:254:0: warning: ignoring #pragma section nearrom [-Wunknown-pragmas] # pragma section nearrom "MSR_CONST_FAST" /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2415:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:270:0: warning: ignoring #pragma section farrom [-Wunknown-pragmas] # pragma section farrom restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:271:0: warning: ignoring #pragma section nearrom [-Wunknown-pragmas] # pragma section nearrom restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2437:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3477:0: warning: ignoring #pragma section farnoclear [-Wunknown-pragmas] # pragma section farnoclear "OS_OsApplication_Core0_ASILD_VAR_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3478:0: warning: ignoring #pragma section farbss [-Wunknown-pragmas] # pragma section farbss "OS_OsApplication_Core0_ASILD_VAR_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3479:0: warning: ignoring #pragma section fardata [-Wunknown-pragmas] # pragma section fardata "OS_OsApplication_Core0_ASILD_VAR" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3480:0: warning: ignoring #pragma section nearnoclear [-Wunknown-pragmas] # pragma section nearnoclear "OS_OsApplication_Core0_ASILD_VAR_FAST_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3481:0: warning: ignoring #pragma section nearbss [-Wunknown-pragmas] # pragma section nearbss "OS_OsApplication_Core0_ASILD_VAR_FAST_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3482:0: warning: ignoring #pragma section neardata [-Wunknown-pragmas] # pragma section neardata "OS_OsApplication_Core0_ASILD_VAR_FAST" /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2443:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3498:0: warning: ignoring #pragma section farnoclear [-Wunknown-pragmas] # pragma section farnoclear restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3499:0: warning: ignoring #pragma section farbss [-Wunknown-pragmas] # pragma section farbss restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3500:0: warning: ignoring #pragma section fardata [-Wunknown-pragmas] # pragma section fardata restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3501:0: warning: ignoring #pragma section nearnoclear [-Wunknown-pragmas] # pragma section nearnoclear restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3502:0: warning: ignoring #pragma section nearbss [-Wunknown-pragmas] # pragma section nearbss restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:3503:0: warning: ignoring #pragma section neardata [-Wunknown-pragmas] # pragma section neardata restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2446:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4431:0: warning: ignoring #pragma section farnoclear [-Wunknown-pragmas] # pragma section farnoclear "OS_OsApplication_Core1_ASILD_VAR_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4432:0: warning: ignoring #pragma section farbss [-Wunknown-pragmas] # pragma section farbss "OS_OsApplication_Core1_ASILD_VAR_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4433:0: warning: ignoring #pragma section fardata [-Wunknown-pragmas] # pragma section fardata "OS_OsApplication_Core1_ASILD_VAR" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4434:0: warning: ignoring #pragma section nearnoclear [-Wunknown-pragmas] # pragma section nearnoclear "OS_OsApplication_Core1_ASILD_VAR_FAST_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4435:0: warning: ignoring #pragma section nearbss [-Wunknown-pragmas] # pragma section nearbss "OS_OsApplication_Core1_ASILD_VAR_FAST_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4436:0: warning: ignoring #pragma section neardata [-Wunknown-pragmas] # pragma section neardata "OS_OsApplication_Core1_ASILD_VAR_FAST" /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2451:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4452:0: warning: ignoring #pragma section farnoclear [-Wunknown-pragmas] # pragma section farnoclear restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4453:0: warning: ignoring #pragma section farbss [-Wunknown-pragmas] # pragma section farbss restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4454:0: warning: ignoring #pragma section fardata [-Wunknown-pragmas] # pragma section fardata restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4455:0: warning: ignoring #pragma section nearnoclear [-Wunknown-pragmas] # pragma section nearnoclear restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4456:0: warning: ignoring #pragma section nearbss [-Wunknown-pragmas] # pragma section nearbss restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:4457:0: warning: ignoring #pragma section neardata [-Wunknown-pragmas] # pragma section neardata restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2454:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6827:0: warning: ignoring #pragma section farnoclear [-Wunknown-pragmas] # pragma section farnoclear "OS_OsApplication_Core2_BSW_QM_VAR_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6828:0: warning: ignoring #pragma section farbss [-Wunknown-pragmas] # pragma section farbss "OS_OsApplication_Core2_BSW_QM_VAR_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6829:0: warning: ignoring #pragma section fardata [-Wunknown-pragmas] # pragma section fardata "OS_OsApplication_Core2_BSW_QM_VAR" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6830:0: warning: ignoring #pragma section nearnoclear [-Wunknown-pragmas] # pragma section nearnoclear "OS_OsApplication_Core2_BSW_QM_VAR_FAST_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6831:0: warning: ignoring #pragma section nearbss [-Wunknown-pragmas] # pragma section nearbss "OS_OsApplication_Core2_BSW_QM_VAR_FAST_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6832:0: warning: ignoring #pragma section neardata [-Wunknown-pragmas] # pragma section neardata "OS_OsApplication_Core2_BSW_QM_VAR_FAST" /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2459:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6848:0: warning: ignoring #pragma section farnoclear [-Wunknown-pragmas] # pragma section farnoclear restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6849:0: warning: ignoring #pragma section farbss [-Wunknown-pragmas] # pragma section farbss restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6850:0: warning: ignoring #pragma section fardata [-Wunknown-pragmas] # pragma section fardata restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6851:0: warning: ignoring #pragma section nearnoclear [-Wunknown-pragmas] # pragma section nearnoclear restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6852:0: warning: ignoring #pragma section nearbss [-Wunknown-pragmas] # pragma section nearbss restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:6853:0: warning: ignoring #pragma section neardata [-Wunknown-pragmas] # pragma section neardata restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2930:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:130:0: warning: ignoring #pragma section farnoclear [-Wunknown-pragmas] # pragma section farnoclear "OS_OsApplication_Core0_ASILD_VAR_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:131:0: warning: ignoring #pragma section farbss [-Wunknown-pragmas] # pragma section farbss "OS_OsApplication_Core0_ASILD_VAR_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:132:0: warning: ignoring #pragma section fardata [-Wunknown-pragmas] # pragma section fardata "OS_OsApplication_Core0_ASILD_VAR" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:133:0: warning: ignoring #pragma section nearnoclear [-Wunknown-pragmas] # pragma section nearnoclear "OS_OsApplication_Core0_ASILD_VAR_FAST_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:134:0: warning: ignoring #pragma section nearbss [-Wunknown-pragmas] # pragma section nearbss "OS_OsApplication_Core0_ASILD_VAR_FAST_ZERO_INIT" /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:135:0: warning: ignoring #pragma section neardata [-Wunknown-pragmas] # pragma section neardata "OS_OsApplication_Core0_ASILD_VAR_FAST" /* PRQA S 3116 */ /* MD_MSR_Pragma */ In file included from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_Type.h:2935:0, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy_Type.h:33, from E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/COMPON~1/Rte_EcomProxy.h:45, from D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.c:35: E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:151:0: warning: ignoring #pragma section farnoclear [-Wunknown-pragmas] # pragma section farnoclear restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:152:0: warning: ignoring #pragma section farbss [-Wunknown-pragmas] # pragma section farbss restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:153:0: warning: ignoring #pragma section fardata [-Wunknown-pragmas] # pragma section fardata restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:154:0: warning: ignoring #pragma section nearnoclear [-Wunknown-pragmas] # pragma section nearnoclear restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:155:0: warning: ignoring #pragma section nearbss [-Wunknown-pragmas] # pragma section nearbss restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ E:/SVN/Project_Customer/MI/Branches/12_E4U1.5/03_D01_NewCode/App/ProA/Appl/GenData/Rte_MemMap.h:156:0: warning: ignoring #pragma section neardata [-Wunknown-pragmas] # pragma section neardata restore /* PRQA S 3116 */ /* MD_MSR_Pragma */ ***** Compiling Master ***** ***** Compiling Communication Modules ***** ***** Linking Master ***** ***** Linking Slave ***** D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E\ts_src01.o: In function `J1939stackWrapper_BCL': D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy/work/00000401/00000402/00000403/0000041E/ts_src01.c:718: undefined reference to `Rte_Com_Get_SPN3072_BCL_VoltageRequirement_uint16' D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy/work/00000401/00000402/00000403/0000041E/ts_src01.c:719: undefined reference to `Rte_Com_Get_SPN3073_BCL_CurrentRequirement_uint16' D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy/work/00000401/00000402/00000403/0000041E/ts_src01.c:720: undefined reference to `Rte_Com_Get_SPN3074_BCL_ChargingModel_uint8' collect2.exe: error: ld returned 1 exit status mingw32-make.exe: *** [D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy/work/00000401/00000402/00000403/0000041E/TS_J19~1.MAK:195: D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E/ts_J1939stackWrapper_BCL_s.exe] Error 1 [DRV] Process '[GNU GCC Eclipse CDT (Default)]D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E:@:mingw32-make.exe --silent -O -j 20 -f "D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy/work/00000401/00000402/00000403/0000041E/TS_J19~1.MAK"' terminated with exit code 0x00000002 [EXP] Process 'driver32.exe "C:\tessy\tmp\tbs\34032.tbs"' terminated with exit code 0x00000001 [ERROR] [EXE] Failed to compile driver for test object 'J1939stackWrapper_BCL' | [LIB] 'C:\PROGRA~1\Razorcat\TESSY_4.3\bin\exp32.exe "D:\Users\2307105076\Desktop\Project_Customer\MI\TESSY\MI_Charge\tessy\work\00000401\00000402\00000403\0000041E\execute.tbs"' terminated with exit code 1 | | [EXP] Process 'driver32.exe "C:\tessy\tmp\tbs\34032.tbs"' terminated with exit code 0x00000001 | | | [DRV] Process '[GNU GCC Eclipse CDT (Default)]D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E:@:mingw32-make.exe --silent -O -j 20 -f "D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy/work/00000401/00000402/00000403/0000041E/TS_J19~1.MAK"' terminated with exit code 0x00000002 [EXE] Test execution finished after 14.5 seconds [ERROR] [EXE] Test execution finished with errors | [EXE] Executing module 'J1939stackWrapperUserCbk' finished with errors | | [EXE] Failed to compile driver for test object 'J1939stackWrapper_BCL' | | | [LIB] 'C:\PROGRA~1\Razorcat\TESSY_4.3\bin\exp32.exe "D:\Users\2307105076\Desktop\Project_Customer\MI\TESSY\MI_Charge\tessy\work\00000401\00000402\00000403\0000041E\execute.tbs"' terminated with exit code 1 | | | | [EXP] Process 'driver32.exe "C:\tessy\tmp\tbs\34032.tbs"' terminated with exit code 0x00000001 | | | | | [DRV] Process '[GNU GCC Eclipse CDT (Default)]D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy\work\00000401\00000402\00000403\0000041E:@:mingw32-make.exe --silent -O -j 20 -f "D:/Users/2307105076/Desktop/PROJEC~1/MI/TESSY/MI_CHA~1/tessy/work/00000401/00000402/00000403/0000041E/TS_J19~1.MAK"' terminated with exit code 0x00000002
最新发布
08-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值