Atmel Studio 7-静态库未定义函数参考
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Atmel Studio 7-静态库未定义函数参考相关的知识,希望对你有一定的参考价值。
我有两个项目的解决方案:-静态库-可执行文件
Exec项目显然取决于库。编译器可以弄清楚库在哪里,我可以使用除IO.c上的内容以外的所有内容(如定义的符号)。在输出文件夹中,我可以找到已复制的IO.o,因此库正在正常构建。错误必须在exec项目方面,但我不知道在哪里搜索。 Google使我失败,或者我搜索的方向错误。
静态库项目的结构如下:
ATMEGA2560
|-headers
| |-IO.h
|-source
| |-IO.c
|-ATMEGA2560.h
可执行项目的结构如下:
|-main.c
编译器包含路径:
../../ATMEGA2560/Release/headers <- IO.h
../../ATMEGA2560/Release/ <- ATMEGA2560.h
所有编译器选项
-x c -funsigned-char -funsigned-bitfields -DNDEBUG -I"E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include" -I"../../ATMEGA2560/Release/headers" -I"../../ATMEGA2560/Release" -O3 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -Wall -Wextra -Wundef -mmcu=atmega2560 -B "E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega2560" -c -std=gnu99 -v -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)"
链接器库:
libm
libATMEGA2560
链接器库路径:
../../ATMEGA2560/Release <- libATMEGA2560.a
所有链接器选项:
-Wl,-static -Wl,-Map="$(OutputFileName).map" -Wl,--start-group -Wl,-lm -Wl,-lATMEGA2560 -Wl,--end-group -Wl,-L"../../ATMEGA2560/Release" -Wl,--gc-sections -mrelax -mmcu=atmega2560 -B "E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega2560" -u _fstat -u _read -u _write
ATMEGA2560.h
#ifndef ATMEGA2560_H_
#define ATMEGA2560_H_
#define F_CPU 16000000L
#include <avr/io.h>
#include <util/delay.h>
#include "headers/IO.h"
#endif
IO.h
#ifndef IO_H_
#define IO_H_
void function_1(void);
#endif
IO.c
#include "../headers/IO.h"
void function_1(void)
return;
main.c
#include "ATMEGA2560.h"
int main(void)
function_1();
DDRB = 0b10000000; // configure pin 7 of PORTB as output (digital pin 13 on the Arduino Mega2560)
while(1)
PORTB = 0b10000000; // set 7th bit to HIGH
_delay_ms(1000);
PORTB = 0b00000000; // set 7th bit to LOW
_delay_ms(1000);
编译输出:
------ Build started: Project: ATMEGA2560, Configuration: Release AVR ------
Shell Utils Path E:\ATMEL\7.0\shellUtils
E:\ATMEL\7.0\shellUtils\make.exe all
Using built-in specs.
Reading specs from E:/ATMEL/7.0/Packs/atmel/ATmega_DFP/1.3.300/gcc/dev/atmega2560/device-specs/specs-atmega2560
COLLECT_GCC=E:\ATMEL\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe
Target: avr
Configured with: /home/toolsbuild/workspace/avr8-gnu-toolchain/src/gcc/configure LDFLAGS=-L/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86-hostlibs/lib CPPFLAGS= --target=avr --host=i686-w64-mingw32 --build=x86_64-pc-linux-gnu --prefix=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 --libdir=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86/lib --enable-languages=c,c++ --with-dwarf2 --enable-doc --disable-shared --disable-libada --disable-libssp --disable-nls --with-avrlibc=yes --with-mpfr=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86-hostlibs --with-gmp=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86-hostlibs --with-mpc=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86-hostlibs --enable-win32-registry=avrtoolchain --with-pkgversion=AVR_8_bit_GNU_Toolchain_3.6.2_1778 --with-bugurl=http://www.microchip.com
Thread model: single
gcc version 5.4.0 (AVR_8_bit_GNU_Toolchain_3.6.2_1778)
COLLECT_GCC_OPTIONS='-funsigned-char' '-funsigned-bitfields' '-D' 'NDEBUG' '-I' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include' '-O3' '-ffunction-sections' '-fdata-sections' '-fpack-struct' '-fshort-enums' '-mrelax' '-Wall' '-Wextra' '-Wundef' '-B' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega2560' '-c' '-std=gnu99' '-v' '-MD' '-MP' '-MF' 'source/IO.d' '-MT' 'source/IO.d' '-MT' 'source/IO.o' '-o' 'source/IO.o' '-specs=device-specs/specs-atmega2560' '-mmcu=avr6'
e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../libexec/gcc/avr/5.4.0/cc1.exe -quiet -v -I E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include -imultilib avr6 -iprefix e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/ -MD source/IO.d -MF source/IO.d -MP -MT source/IO.d -MT source/IO.o -D__AVR_ATmega2560__ -D__AVR_DEVICE_NAME__=atmega2560 -D__AVR_DEV_LIB_NAME__=m2560 -D NDEBUG ../source/IO.c -mn-flash=4 -mno-skip-bug -quiet -dumpbase IO.c -mrelax -mmcu=avr6 -auxbase-strip source/IO.o -O3 -Wall -Wextra -Wundef -std=gnu99 -version -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -o C:\Users\gothi\AppData\Local\Temp\cc9EwEFa.s
GNU C99 (AVR_8_bit_GNU_Toolchain_3.6.2_1778) version 5.4.0 (avr)
compiled by GNU C version 4.7.4, GMP version 5.0.2, MPFR version 3.0.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/../../../../avr/sys-include"
ignoring duplicate directory "e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/lib/gcc/../../lib/gcc/avr/5.4.0/include"
ignoring duplicate directory "e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/lib/gcc/../../lib/gcc/avr/5.4.0/include-fixed"
ignoring nonexistent directory "e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/lib/gcc/../../lib/gcc/avr/5.4.0/../../../../avr/sys-include"
ignoring duplicate directory "e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/lib/gcc/../../lib/gcc/avr/5.4.0/../../../../avr/include"
#include "..." search starts here:
#include <...> search starts here:
E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include
e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/include
e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/include-fixed
e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/../../../../avr/include
End of search list.
GNU C99 (AVR_8_bit_GNU_Toolchain_3.6.2_1778) version 5.4.0 (avr)
compiled by GNU C version 4.7.4, GMP version 5.0.2, MPFR version 3.0.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 7a32dfd92aeb38c911f2be52b5ef5d52
COLLECT_GCC_OPTIONS='-funsigned-char' '-funsigned-bitfields' '-D' 'NDEBUG' '-I' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include' '-O3' '-ffunction-sections' '-fdata-sections' '-fpack-struct' '-fshort-enums' '-mrelax' '-Wall' '-Wextra' '-Wundef' '-B' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega2560' '-c' '-std=gnu99' '-v' '-MD' '-MP' '-MF' 'source/IO.d' '-MT' 'source/IO.d' '-MT' 'source/IO.o' '-o' 'source/IO.o' '-specs=device-specs/specs-atmega2560' '-mmcu=avr6'
e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/as.exe -mmcu=avr6 --mlink-relax -mno-skip-bug -o source/IO.o C:\Users\gothi\AppData\Local\Temp\cc9EwEFa.s
COMPILER_PATH=E:/ATMEL/7.0/Packs/atmel/ATmega_DFP/1.3.300/gcc/dev/atmega2560/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../libexec/gcc/avr/5.4.0/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../libexec/gcc/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/
LIBRARY_PATH=E:/ATMEL/7.0/Packs/atmel/ATmega_DFP/1.3.300/gcc/dev/atmega2560/avr6/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr6/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr6/;E:/ATMEL/7.0/Packs/atmel/ATmega_DFP/1.3.300/gcc/dev/atmega2560/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/
COLLECT_GCC_OPTIONS='-funsigned-char' '-funsigned-bitfields' '-D' 'NDEBUG' '-I' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include' '-O3' '-ffunction-sections' '-fdata-sections' '-fpack-struct' '-fshort-enums' '-mrelax' '-Wall' '-Wextra' '-Wundef' '-B' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega2560' '-c' '-std=gnu99' '-v' '-MD' '-MP' '-MF' 'source/IO.d' '-MT' 'source/IO.d' '-MT' 'source/IO.o' '-o' 'source/IO.o' '-specs=device-specs/specs-atmega2560' '-mmcu=avr6'
E:\ATMEL\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-ar.exe: creating libATMEGA2560.a
C:\Windows\System32\xcopy /Y "C:\Users\gothi\Documents\Atmel Studio\7.0\Drone\ATMEGA2560\headers\*.h" "C:\Users\gothi\Documents\Atmel Studio\7.0\Drone\ATMEGA2560\Release\headers\*.h"
C:\Windows\System32\xcopy /Y "C:\Users\gothi\Documents\Atmel Studio\7.0\Drone\ATMEGA2560\*.h" "C:\Users\USER\Documents\Atmel Studio\7.0\Drone\ATMEGA2560\Release\*.h"
C:\Users\gothi\Documents\Atmel Studio\7.0\Drone\ATMEGA2560\headers\IO.h
1 File(s) copied
C:\Users\gothi\Documents\Atmel Studio\7.0\Drone\ATMEGA2560\ATMEGA2560.h
1 File(s) copied
------ Build started: Project: Drone, Configuration: Release AVR ------
Shell Utils Path E:\ATMEL\7.0\shellUtils
E:\ATMEL\7.0\shellUtils\make.exe all
Using built-in specs.
Reading specs from E:/ATMEL/7.0/Packs/atmel/ATmega_DFP/1.3.300/gcc/dev/atmega2560/device-specs/specs-atmega2560
COLLECT_GCC=E:\ATMEL\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe
Target: avr
Configured with: /home/toolsbuild/workspace/avr8-gnu-toolchain/src/gcc/configure LDFLAGS=-L/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86-hostlibs/lib CPPFLAGS= --target=avr --host=i686-w64-mingw32 --build=x86_64-pc-linux-gnu --prefix=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 --libdir=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86/lib --enable-languages=c,c++ --with-dwarf2 --enable-doc --disable-shared --disable-libada --disable-libssp --disable-nls --with-avrlibc=yes --with-mpfr=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86-hostlibs --with-gmp=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86-hostlibs --with-mpc=/home/toolsbuild/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86-hostlibs --enable-win32-registry=avrtoolchain --with-pkgversion=AVR_8_bit_GNU_Toolchain_3.6.2_1778 --with-bugurl=http://www.microchip.com
Thread model: single
gcc version 5.4.0 (AVR_8_bit_GNU_Toolchain_3.6.2_1778)
COLLECT_GCC_OPTIONS='-funsigned-char' '-funsigned-bitfields' '-D' 'NDEBUG' '-I' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include' '-I' '../../ATMEGA2560/Release/headers' '-I' '../../ATMEGA2560/Release' '-O3' '-ffunction-sections' '-fdata-sections' '-fpack-struct' '-fshort-enums' '-mrelax' '-Wall' '-Wextra' '-Wundef' '-B' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega2560' '-c' '-std=gnu99' '-v' '-MD' '-MP' '-MF' 'main.d' '-MT' 'main.d' '-MT' 'main.o' '-o' 'main.o' '-specs=device-specs/specs-atmega2560' '-mmcu=avr6'
e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../libexec/gcc/avr/5.4.0/cc1.exe -quiet -v -I E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include -I ../../ATMEGA2560/Release/headers -I ../../ATMEGA2560/Release -imultilib avr6 -iprefix e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/ -MD main.d -MF main.d -MP -MT main.d -MT main.o -D__AVR_ATmega2560__ -D__AVR_DEVICE_NAME__=atmega2560 -D__AVR_DEV_LIB_NAME__=m2560 -D NDEBUG .././main.c -mn-flash=4 -mno-skip-bug -quiet -dumpbase main.c -mrelax -mmcu=avr6 -auxbase-strip main.o -O3 -Wall -Wextra -Wundef -std=gnu99 -version -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -o C:\Users\gothi\AppData\Local\Temp\ccvaSiXr.s
GNU C99 (AVR_8_bit_GNU_Toolchain_3.6.2_1778) version 5.4.0 (avr)
compiled by GNU C version 4.7.4, GMP version 5.0.2, MPFR version 3.0.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/../../../../avr/sys-include"
ignoring duplicate directory "e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/lib/gcc/../../lib/gcc/avr/5.4.0/include"
ignoring duplicate directory "e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/lib/gcc/../../lib/gcc/avr/5.4.0/include-fixed"
ignoring nonexistent directory "e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/lib/gcc/../../lib/gcc/avr/5.4.0/../../../../avr/sys-include"
ignoring duplicate directory "e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/lib/gcc/../../lib/gcc/avr/5.4.0/../../../../avr/include"
#include "..." search starts here:
#include <...> search starts here:
E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include
../../ATMEGA2560/Release/headers
../../ATMEGA2560/Release
e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/include
e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/include-fixed
e:\atmel\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\../lib/gcc/avr/5.4.0/../../../../avr/include
End of search list.
GNU C99 (AVR_8_bit_GNU_Toolchain_3.6.2_1778) version 5.4.0 (avr)
compiled by GNU C version 4.7.4, GMP version 5.0.2, MPFR version 3.0.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 7a32dfd92aeb38c911f2be52b5ef5d52
COLLECT_GCC_OPTIONS='-funsigned-char' '-funsigned-bitfields' '-D' 'NDEBUG' '-I' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include' '-I' '../../ATMEGA2560/Release/headers' '-I' '../../ATMEGA2560/Release' '-O3' '-ffunction-sections' '-fdata-sections' '-fpack-struct' '-fshort-enums' '-mrelax' '-Wall' '-Wextra' '-Wundef' '-B' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega2560' '-c' '-std=gnu99' '-v' '-MD' '-MP' '-MF' 'main.d' '-MT' 'main.d' '-MT' 'main.o' '-o' 'main.o' '-specs=device-specs/specs-atmega2560' '-mmcu=avr6'
e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/as.exe -mmcu=avr6 --mlink-relax -mno-skip-bug -o main.o C:\Users\gothi\AppData\Local\Temp\ccvaSiXr.s
COMPILER_PATH=E:/ATMEL/7.0/Packs/atmel/ATmega_DFP/1.3.300/gcc/dev/atmega2560/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../libexec/gcc/avr/5.4.0/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../libexec/gcc/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/
LIBRARY_PATH=E:/ATMEL/7.0/Packs/atmel/ATmega_DFP/1.3.300/gcc/dev/atmega2560/avr6/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr6/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr6/;E:/ATMEL/7.0/Packs/atmel/ATmega_DFP/1.3.300/gcc/dev/atmega2560/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/;e:/atmel/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/
COLLECT_GCC_OPTIONS='-funsigned-char' '-funsigned-bitfields' '-D' 'NDEBUG' '-I' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\include' '-I' '../../ATMEGA2560/Release/headers' '-I' '../../ATMEGA2560/Release' '-O3' '-ffunction-sections' '-fdata-sections' '-fpack-struct' '-fshort-enums' '-mrelax' '-Wall' '-Wextra' '-Wundef' '-B' 'E:\ATMEL\7.0\Packs\atmel\ATmega_DFP\1.3.300\gcc\dev\atmega2560' '-c' '-std=gnu99' '-v' '-MD' '-MP' '-MF' 'main.d' '-MT' 'main.d' '-MT' 'main.o' '-o' 'main.o' '-specs=device-specs/specs-atmega2560' '-mmcu=avr6'
main.o: In function `main':
C:\Users\USER\Documents\Atmel Studio\7.0\Drone\Drone\Release\main.c(1,1): error: undefined reference to `function_1'
collect2.exe(0,0): error: ld returned 1 exit status
make: *** [Drone.elf] Error 1
C:\Users\USER\Documents\Atmel Studio\7.0\Drone\Drone\Release\Makefile(106,1): error: recipe for target 'Drone.elf' failed
Done building project "Drone.cproj" -- FAILED.
Build FAILED.
========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========
答案
也许这只是一个错字,但您说您的静态库具有结构:
ATMEGA2560
|-headers
| |-IO.h
|-source
| |-IO.c
|-ATMEGA2560.h
但是您引用的是其中包含Release文件夹的目录,例如,
ATMEGA2560
|-Release
| |-headers
| | |-IO.h
| |-source
| | |-IO.c
| |-ATMEGA2560.h
此外,还有avr / io.h,来自AVR libc库和您的IO.h。过去,我在使用Atmel Studio时遇到问题,无法分辨adc.h和ADC.h之类的文件之间的区别。尝试将您的ATMEGA2560标头IO.h重命名为其他名称(如果可以的话),也许可以解决您的问题。
以上是关于Atmel Studio 7-静态库未定义函数参考的主要内容,如果未能解决你的问题,请参考以下文章
Atmel Studio 7 如何编译和调试 Arduino 代码?
将项目从 ICCAVR 移植到 Atmel Studio 7.0 _flash 问题