Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Undefined Reference Error #2

Open
bmartin598 opened this issue Apr 6, 2021 · 0 comments
Open

Undefined Reference Error #2

bmartin598 opened this issue Apr 6, 2021 · 0 comments

Comments

@bmartin598
Copy link

Previously I was able to compile the .cpp on my Raspberry Pi with no issues. Now I am having several. The g++ compiler throws an error saying <include/lidarlite_v3.h> can not be found. To fix this problem i added lidarlite_v3.h to the default linux include file and changed the code to #include <lidarlite_v3.h>. This seems to fix the error of not finding the file but then the compiler throws the following:

    /usr/bin/ld: /tmp/ccnZe3GD.o: in function `main':
    llv3.cpp:(.text+0x10): undefined reference to `LIDARLite_v3::i2c_init()'
    /usr/bin/ld: llv3.cpp:(.text+0x20): undefined reference to `LIDARLite_v3::configure(unsigned char, unsigned char)'
    /usr/bin/ld: llv3.cpp:(.text+0x2c): undefined reference to `LIDARLite_v3::getBusyFlag(unsigned char)'
    /usr/bin/ld: llv3.cpp:(.text+0x4c): undefined reference to `LIDARLite_v3::takeRange(unsigned char)'
    /usr/bin/ld: llv3.cpp:(.text+0x58): undefined reference to `LIDARLite_v3::readDistance(unsigned char)'
    collect2: error: ld returned 1 exit status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant