我正在使用Atrollic Studio(Eclipse中也存在問題)。未定義的引用extern int stm32
.h文件中
extern int i2cInitIO(uint channel, uint hz);
extern int i2cIO(uint device, byte *put, uint putlen, byte *get, uint getlen);
.c文件
#include "tollosI2C.h"
int i2cGetReg(uint device, byte reg, byte *get) {
// write one byte address then read 1 byte data
return i2cIO(device, ®, 1, get, 1);
} // i2cGetReg
我有一個問題:未定義的引用`i2cIO'.This項目是需要通過ARM工具鏈進行編譯。 StM32F103VET6 - 高密度設備。我使用ST-Link。
UPD:我.h文件中 - http://pastebin.com/52ftBxR9
和c。文件 - http://pastebin.com/CcjpVZUP
編譯器調用命令 - 不帶大括號的「gcc」。
編譯器調用參數 - 「-E -P -v -dD $ {plugin_state_location} /specs.c」不帶大括號。
平臺?鏈接器命令行?鏈接器設置? – moshbear
你提供了i2cIO(...)somwhere的定義嗎?或者你可能忘記鏈接到包含的庫? – xmoex
請參閱upd。 – SevenDays