我编译了一个测试并且遇到了很多错误。我不知道它是什么。任何人都可以解释。
D:\Projects\mbed-os-example-blinky-master>mbed test -m ublox_c030_u201 -t gcc_arm --compile
Build failures:
* UBLOX_C030_U201::GCC_ARM::MBED-OS-FEATURES-FEATURE_LWIP-TESTS-MBEDMICRO-NET-CONNECTIVITY
Building project connectivity (UBLOX_C030_U201, GCC_ARM)
Scan: gcc_arm
Scan: connectivity
Scan: FEATURE_LWIP
Link: connectivity
D:/Projects/mbed-os-example-blinky-master/BUILD/tests/ublox_c030_u201/gcc_arm/main.o: In function `main':
main.cpp:(.text.startup.main+0x0): multiple definition of `main'
D:/Projects/mbed-os-example-blinky-master/BUILD/tests/ublox_c030_u201/gcc_arm/./mbed-os/features/FEATURE_LWIP/TESTS/mbedmicro-net/connectivity/./main.o:main.cpp:(.text.startup.main+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
[mbed] ERROR: "c:\python27\python.exe" returned error code 1.
[mbed] ERROR: Command "c:\python27\python.exe -u D:\Projects\mbed-os-example-blinky-master\mbed-os\tools\test.py -t gcc_arm -m ublox_c030_u201 --source D:\Projects\mbed-os-example-blinky-master --build D:\Projects\mbed-os-example-blinky-master\BUILD\tests\ublox_c030_u201\gcc_arm --test-spec D:\Projects\mbed-os-example-blinky-master\BUILD\tests\ublox_c030_u201\gcc_arm\test_spec.json" in "D:\Projects\mbed-os-example-blinky-master"
答案 0 :(得分:0)
您正在编译此目标的测试,同时您还拥有自己的程序。这不会起作用,因为测试和程序都有main
功能。
取而代之的是:
mbed compile -m ublox_c030_u201 -t gcc_arm