python - "multiple definition of `main'" error when compiling a mbed OS program -
i have compiled test , got lots of errors. have no idea is. can explain please.
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"
you compiling tests target, while have own program. won't work both tests , program have main
function.
instead do:
mbed compile -m ublox_c030_u201 -t gcc_arm
Comments
Post a Comment