-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I tried compiling an existing Arduino library with the following commands
g++ -c at86rf2xx.cpp
g++ -c at86rf2xx-internal.cpp
g++ -c at86rf2xx-getset.cpp
g++ -x c++ -c arduino-at86rf233.ino
g++ -lpiduino -o test_radio at86rf2xx.o at86rf2xx-internal.o at86rf2xx-getset.o arduino-at86rf233.o
g++ gave me the following erros
at86rf2xx-internal.o: In function `main':
at86rf2xx-internal.cpp:(.text+0x0): multiple definition of `main'
at86rf2xx.o:at86rf2xx.cpp:(.text+0x0): first defined here
at86rf2xx-getset.o: In function `main':
at86rf2xx-getset.cpp:(.text+0x0): multiple definition of `main'
at86rf2xx.o:at86rf2xx.cpp:(.text+0x0): first defined here
arduino-at86rf233.o: In function `main':
arduino-at86rf233.ino:(.text+0x0): multiple definition of `main'
Inspecting the assembly showed that a main label was created for each object file
Within piduino's Arduino.h file, it seems to provide a full definition for main().
https://github.com/NVSL/PiDuino_Library/blob/master/Arduinoh/Arduino.h#L36
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels