Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Couldn't compile examples #2

Open
UlmerMan opened this issue Oct 20, 2023 · 0 comments
Open

Couldn't compile examples #2

UlmerMan opened this issue Oct 20, 2023 · 0 comments

Comments

@UlmerMan
Copy link

I wanted to compile flight_sim.cpp but got this error:
g++ -L/usr/lib/ -lnaza -lwiringPi -o flight_sim.exe flight_sim.o
/usr/bin/ld: flight_sim.o: in function main': flight_sim.cpp:(.text+0x18): undefined reference to PCA9685::PCA9685(unsigned char)'
/usr/bin/ld: flight_sim.cpp:(.text+0x28): undefined reference to PCA9685::SetFrequency(unsigned short)' /usr/bin/ld: flight_sim.cpp:(.text+0x5c): undefined reference to ConfigFile::ConfigFile(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: flight_sim.cpp:(.text+0x80): undefined reference to naza_interface_manual_c::naza_interface_manual_c()' /usr/bin/ld: flight_sim.cpp:(.text+0x94): undefined reference to naza_interface_manual_c::init_naza(ConfigFile&, PCA9685&)'
/usr/bin/ld: flight_sim.cpp:(.text+0x27c): undefined reference to naza_interface_manual_c::fly_forward(ConfigFile&, PCA9685&, int)' /usr/bin/ld: flight_sim.cpp:(.text+0x2dc): undefined reference to naza_interface_manual_c::fly_back(ConfigFile&, PCA9685&, int)'
/usr/bin/ld: flight_sim.cpp:(.text+0x33c): undefined reference to naza_interface_manual_c::fly_throttle(ConfigFile&, PCA9685&, int)' /usr/bin/ld: flight_sim.cpp:(.text+0x39c): undefined reference to naza_interface_manual_c::fly_left(ConfigFile&, PCA9685&, int)'
/usr/bin/ld: flight_sim.cpp:(.text+0x3fc): undefined reference to naza_interface_manual_c::fly_right(ConfigFile&, PCA9685&, int)' /usr/bin/ld: flight_sim.cpp:(.text+0x45c): undefined reference to naza_interface_manual_c::fly_turn_right(ConfigFile&, PCA9685&, int)'
/usr/bin/ld: flight_sim.cpp:(.text+0x4bc): undefined reference to naza_interface_manual_c::fly_turn_left(ConfigFile&, PCA9685&, int)' /usr/bin/ld: flight_sim.cpp:(.text+0x534): undefined reference to naza_interface_manual_c::set_flight_mode(ConfigFile&, PCA9685&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)'
/usr/bin/ld: flight_sim.cpp:(.text+0x574): undefined reference to naza_interface_manual_c::arm_motors(ConfigFile&, PCA9685&)' /usr/bin/ld: flight_sim.cpp:(.text+0x5a8): undefined reference to naza_interface_manual_c::set_neutral(ConfigFile&, PCA9685&)'
/usr/bin/ld: flight_sim.cpp:(.text+0x630): undefined reference to naza_interface_manual_c::~naza_interface_manual_c()' /usr/bin/ld: flight_sim.cpp:(.text+0x650): undefined reference to PCA9685::~PCA9685()'
collect2: error: ld returned 1 exit status
make: *** [Makefile:4: flight_sim] Error 1
I installde the library as recommended in the README.
Im usin the raspberry pi 3B

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant