-
Notifications
You must be signed in to change notification settings - Fork 2
Problems compiling for ESP32 #1
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
Comments
It's never a good idea to include headers using an absolute path. Try installing the library using the |
Thank you for the help, I managed to get it to work after installing the library correctly but I also need to change the function in householdQR.cpp ComputeFactorization to not use std::copysign. I had to include the cmath header and remove the std:: namespace. Might be a small bug when compiling on ESP32 or it might be just my system. |
That's not a good idea, the compiler will not select the right overload of these C math functions, you have to use the C++ math functions prefixed with The latest CI run was successful for ESP32, so I'm not sure why you're seeing this error: https://github.com/tttapa/Linear-Algebra/runs/1942413800?check_suite_focus=true |
Sounds good. Only the copysign function was throwing an error saying "std::copysign" is not a member of the std namespace. |
The examples compile successfully for me using Arduino 1.8.15 and ESP32 core version 1.0.6. |
Hello,
I'm trying to impliment this branch on the ESP32 but I've ran into some issues.
Code:
#include "C:\Users\mxf5351\Documents\Linear-Algebra-arduino\Linear-Algebra-arduino\src\Linear_Algebra.h"
#include "C:\Users\mxf5351\Documents\Linear-Algebra-arduino\Linear-Algebra-arduino\src\include\linalg\HouseholderQR.hpp"
#include "C:\Users\mxf5351\Documents\Linear-Algebra-arduino\Linear-Algebra-arduino\src\include\linalg\Matrix.hpp"
void setup(){
Matrix A = {
{11, 12, 13},
{21, 22, 23},
{31, 32, 33},
};
}
void loop() {}
Errors:
sketch\sketch_aug06a.ino.cpp.o:(.literal._ZNK6Matrix7printToER5Print[Matrix::printTo(Print&) const]+0x0): undefined reference to
Matrix::print(Print&, unsigned char, unsigned char) const' sketch\sketch_aug06a.ino.cpp.o:(.literal._Z5setupv+0x4): undefined reference to
SquareMatrix::SquareMatrix(std::initializer_list<std::initializer_list >)'sketch\sketch_aug06a.ino.cpp.o: In function
Matrix::printTo(Print&) const': C:\Users\mxf5351\Documents\Linear-Algebra-arduino\Linear-Algebra-arduino\src\include/linalg/Matrix.hpp:260: undefined reference to
Matrix::print(Print&, unsigned char, unsigned char) const'sketch\sketch_aug06a.ino.cpp.o: In function
setup()': C:\Users\mxf5351\Documents\sketch_aug06a/sketch_aug06a.ino:10: undefined reference to
SquareMatrix::SquareMatrix(std::initializer_list<std::initializer_list >)'collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.
I'm stumped as to why this is occurring as these functions are absolutely defined in the library.
Any thoughts or suggestions would be greatly appriciated.
The text was updated successfully, but these errors were encountered: