Pros v5 build issues

I need help trying to build PROS project. I have little exp. with PROS and Okapi, so I’m not to sure about how to fix this. This is the output of prosv5 build all in my project path User name is my name obviously.

C:\Users\user name\pros\ 1115D> prosv5 build all
Cleaning project
Creating cold package with okapilib,libm,libc,libpros [OK]
Stripping cold package [DONE]
Section sizes:
text data bss total hex filename
1.08MB 3.67KB 47.62MB 48.70MB 30b102d bin/cold.package.elf
Compiled src/autonomous.cpp [OK]
Compiled src/initialize.cpp [OK]
Compiled src/opcontrol.cpp [OK]
Compiled src/subsystems.cpp [OK]
Adding timestamp [OK]
Linking hot project with ./bin/cold.package.elf and okapilib,libm,libc,libpros [ERRORS]
bin/subsystems.cpp.o:C:\Users\user name\pros\ 1115D/src/subsystems.cpp:9: multiple definition of masterController' bin/opcontrol.cpp.o:C:\Users\user name\pros\ 1115D/src/subsystems.cpp:9: first defined here bin/subsystems.cpp.o:C:\Users\user name\pros\ 1115D/src/subsystems.cpp:8: multiple definition ofdrive’
bin/opcontrol.cpp.o:C:\Users\user name\pros\ 1115D/src/subsystems.cpp:8: first defined here
bin/subsystems.cpp.o:C:\Users\user name\pros\ 1115D/src/subsystems.cpp:7: multiple definition of rightDrive' bin/opcontrol.cpp.o:C:\Users\user name\pros\ 1115D/src/subsystems.cpp:7: first defined here bin/subsystems.cpp.o:C:\Users\user name\pros\ 1115D/src/subsystems.cpp:6: multiple definition ofleftDrive’
bin/opcontrol.cpp.o:C:\Users\user name\pros\ 1115D/src/subsystems.cpp:6: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [common.mk:237: bin/hot.package.elf] Error 1
Capturing metadata for PROS Editor…
Error: Failed to build

Here are the project files
Gdrive

You need to understand how the compiler works, how the linker works, how header files work, and what forward declarations are.

You are not supposed to have any function definitions in header files. Header files are supposed to just contain forward declarations of their source (.cpp) counterparts.
Read learncpp.com
Chapter 0.5 & 2.7-2.12

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.