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

Compile (Link) error of "undefined reference" #4

Open
kota65535 opened this issue Dec 31, 2015 · 2 comments
Open

Compile (Link) error of "undefined reference" #4

kota65535 opened this issue Dec 31, 2015 · 2 comments

Comments

@kota65535
Copy link

I'm facing the trouble that I cannot compile my Arduino project with stlport-avr.

My Environment

  • OS X 10.10
  • Arduino IDE 1.6.7

Things I have done

  1. clone the repository to my Arduino library directory
  2. switch the branch to "STLport-5.2-arduino-installed"
  3. write the sketch below:
#include <stlport.h>
#include <vector>

std::vector<uint8_t> vec(10 ,5);

void setup() {
    Serial.begin(9600);
}

void loop() {
}
  1. build by Arduino IDE
  2. The link error occurs as follows (I attached full error messages)
/var/folders/5w/b53_wn1j7kjd5btjls6z14nh0000gn/T/builde3628213459b7c2b9c62d4ab4b6b64fe.tmp/sketch/sketch_dec31a.ino.cpp.o: In function `__stl_new':
/Users/tomohiko/Documents/Arduino/libraries/stlport/stl/_new.h:170: undefined reference to `std::__node_alloc::_M_allocate(unsigned int&)'
/var/folders/5w/b53_wn1j7kjd5btjls6z14nh0000gn/T/builde3628213459b7c2b9c62d4ab4b6b64fe.tmp/sketch/sketch_dec31a.ino.cpp.o: In function `__stl_delete':
/Users/tomohiko/Documents/Arduino/libraries/stlport/stl/_new.h:171: undefined reference to `std::__node_alloc::_M_deallocate(void*, unsigned int)'
collect2: error: ld returned 1 exit status
Using library stlport in folder: /Users/tomohiko/Documents/Arduino/libraries/stlport (legacy)
exit status 1

The compile seems to be succeeded, but undefined reference error occurs in the link stage.
Am I doing something wrong when install?

error_message.txt

@gregarican
Copy link

I am running into the same scenario trying to link a different program against STLPort. Out of curiosity were you able to resolve this? If so, do you recall how?

@kkostecki
Copy link

Hi guys, has anybody solved this issue?

Would be appreciated to know the trick.
What toolchain (Arduino IDE, compiler) was used to test/build library?

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

3 participants