未解析的符号,首先在
unresolved symbol , first referenced in
我有 4 个文件(2 个 headers,2 个来源):
- lcd.h,
- lcd.c,
- azt.h 和
- azt.c
我在 azt 中加入了 lcd。[=16=]
在 lcd 中有一个函数 WriteMsg
在 azt 中被调用,
它工作正常。
但是当我在lcd.c中添加对该函数的调用时,出现以下错误
Description Resource Path Location Type
unresolved symbol WriteMsg, first referenced in ./Includes/AutoZeroTracking.obj Joe1000 C/C++ Problem
我知道我首先在azt文件中引用了它,但是在其他地方引用了这个函数,我没有这个问题。
这是lcd.h:
#ifndef MSP
#define MSP
#include <msp430g2553.h>
#endif
#include "Utilities.h"
#include "Declarations.h"
#ifndef INCLUDES_LCD_H_
#define INCLUDES_LCD_H_
#define LCD_CALL 1
void InitLCD(unsigned char SDA,unsigned char SCL,unsigned char slaveAddress);
void StartLCD();
inline int ReadyToSend();
void SendToLcd(unsigned char* data, int size);
void WriteToLCD(int clearScreen);
void switchFrom8To4Bits();
void write2x4Bits(unsigned char bits, int is_data);
void writeCommand(unsigned char command);
inline void writeData(unsigned char data);
void ClearScreen();
void WriteWeight();
void WriteWeightMode();
inline void WriteMsg(const char* msg, int msgLen,char msgLocation,int maxDigits);
inline void WriteNum(long num,char location,int maxDigits);
void WriteTare(char num);
#endif /* INCLUDES_LCD_H_ */
这是 azt.h:
#ifndef INCLUDES_AUTOZEROTRACKING_H_
#define INCLUDES_AUTOZEROTRACKING_H_
#include "Declarations.h"
#include "LCD.h"
#include "Utilities.h"
void AZTSetup();
void AZTProcess();
void DisplayAZT();
void GetPreviousAZT();
void GetNextAZT();
void KeyPressedAZTMode(char keyPressed);
inline char HasAZTStopped();
#endif /* INCLUDES_AUTOZEROTRACKING_H_ */
代码在azt.c
void DisplayAZT()
{
WriteMsg(AZT[m_curr_azt],AZTLen[m_curr_azt],0x8A,5);
}
lcd.c
中的调用
void WriteWeight()
{
WriteNum(CountBy[cnt_by_idx],0x80,2);
WriteNum(NOD[n_o_d_idx],0x83,5);
WriteNum(max_weight,0x89,6);
WriteNum(idx_decimal_point,0x90,1);
WriteMsg(AZT[az_tracking_idx],AZTLen[az_tracking_idx],0x9A,3);
WriteNum(BaudRate[baud_rate_idx],0xC0,6);
WriteNum(PP2Z[percent_p2z_idx],0x9E,2);
WriteNum(wt_zero,0x94,10);
WriteNum(wt_slope,0xD4,10);
/*int i = 0;
for(i = 0; i < WEIGHT_ARR_LEN ; i++)
{
if(display_weight[i] != IGNORE_CHAR)
writeData(display_weight[i]);
}*/
}
提前致谢。
我删除了内联并编译。
我有 4 个文件(2 个 headers,2 个来源):
- lcd.h,
- lcd.c,
- azt.h 和
- azt.c
我在 azt 中加入了 lcd。[=16=]
在 lcd 中有一个函数 WriteMsg
在 azt 中被调用,
它工作正常。
但是当我在lcd.c中添加对该函数的调用时,出现以下错误
Description Resource Path Location Type
unresolved symbol WriteMsg, first referenced in ./Includes/AutoZeroTracking.obj Joe1000 C/C++ Problem
我知道我首先在azt文件中引用了它,但是在其他地方引用了这个函数,我没有这个问题。
这是lcd.h:
#ifndef MSP
#define MSP
#include <msp430g2553.h>
#endif
#include "Utilities.h"
#include "Declarations.h"
#ifndef INCLUDES_LCD_H_
#define INCLUDES_LCD_H_
#define LCD_CALL 1
void InitLCD(unsigned char SDA,unsigned char SCL,unsigned char slaveAddress);
void StartLCD();
inline int ReadyToSend();
void SendToLcd(unsigned char* data, int size);
void WriteToLCD(int clearScreen);
void switchFrom8To4Bits();
void write2x4Bits(unsigned char bits, int is_data);
void writeCommand(unsigned char command);
inline void writeData(unsigned char data);
void ClearScreen();
void WriteWeight();
void WriteWeightMode();
inline void WriteMsg(const char* msg, int msgLen,char msgLocation,int maxDigits);
inline void WriteNum(long num,char location,int maxDigits);
void WriteTare(char num);
#endif /* INCLUDES_LCD_H_ */
这是 azt.h:
#ifndef INCLUDES_AUTOZEROTRACKING_H_
#define INCLUDES_AUTOZEROTRACKING_H_
#include "Declarations.h"
#include "LCD.h"
#include "Utilities.h"
void AZTSetup();
void AZTProcess();
void DisplayAZT();
void GetPreviousAZT();
void GetNextAZT();
void KeyPressedAZTMode(char keyPressed);
inline char HasAZTStopped();
#endif /* INCLUDES_AUTOZEROTRACKING_H_ */
代码在azt.c
void DisplayAZT()
{
WriteMsg(AZT[m_curr_azt],AZTLen[m_curr_azt],0x8A,5);
}
lcd.c
中的调用void WriteWeight()
{
WriteNum(CountBy[cnt_by_idx],0x80,2);
WriteNum(NOD[n_o_d_idx],0x83,5);
WriteNum(max_weight,0x89,6);
WriteNum(idx_decimal_point,0x90,1);
WriteMsg(AZT[az_tracking_idx],AZTLen[az_tracking_idx],0x9A,3);
WriteNum(BaudRate[baud_rate_idx],0xC0,6);
WriteNum(PP2Z[percent_p2z_idx],0x9E,2);
WriteNum(wt_zero,0x94,10);
WriteNum(wt_slope,0xD4,10);
/*int i = 0;
for(i = 0; i < WEIGHT_ARR_LEN ; i++)
{
if(display_weight[i] != IGNORE_CHAR)
writeData(display_weight[i]);
}*/
}
提前致谢。
我删除了内联并编译。