-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 symbols for architecture x86_64 using Macos 10.12.6 #210
Comments
One idea is that you seem to be linking with a static library (liblsd_slam.a). This won't, automatically, pull in all the dependent libraries. Can you run: make VERBOSE=1 and see if it's trying to link in the csparse libraries at all? If not, you'll have to manually include csparse in the target_link_libraries. (There is a branch on github which uses new-style cmake options which should hopefully address this problem.) |
|
@niebayes Could you please provide a little more detail on how to implement this? Do you think it will solve the issue I just posted? #423 |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Hi,
I met this problem when I built a project using g2o.
[100%] Linking CXX executable ../../../bin/sample_app Undefined symbols for architecture x86_64: "g2o::csparse_extension::cs_cholsolsymb(cs_di_sparse const*, double*, cs_di_symbolic const*, double*, int*)", referenced from: g2o::LinearSolverCSparse<Eigen::Matrix<double, 7, 7, 0, 7, 7> >::solve(g2o::SparseBlockMatrix<Eigen::Matrix<double, 7, 7, 0, 7, 7> > const&, double*, double*) in liblsd_slam.a(key_frame_graph.cc.o) "g2o::csparse_extension::writeCs2Octave(char const*, cs_di_sparse const*, bool)", referenced from: g2o::LinearSolverCSparse<Eigen::Matrix<double, 7, 7, 0, 7, 7> >::solve(g2o::SparseBlockMatrix<Eigen::Matrix<double, 7, 7, 0, 7, 7> > const&, double*, double*) in liblsd_slam.a(key_frame_graph.cc.o) "g2o::csparse_extension::cs_chol_workspace(cs_di_sparse const*, cs_di_symbolic const*, int*, double*)", referenced from: g2o::LinearSolverCSparse<Eigen::Matrix<double, 7, 7, 0, 7, 7> >::solveBlocks(double**&, g2o::SparseBlockMatrix<Eigen::Matrix<double, 7, 7, 0, 7, 7> > const&) in liblsd_slam.a(key_frame_graph.cc.o) g2o::LinearSolverCSparse<Eigen::Matrix<double, 7, 7, 0, 7, 7> >::solvePattern(g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, std::__1::vector<std::__1::pair<int, int>, std::__1::allocator<std::__1::pair<int, int> > > const&, g2o::SparseBlockMatrix<Eigen::Matrix<double, 7, 7, 0, 7, 7> > const&) in liblsd_slam.a(key_frame_graph.cc.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [../bin/sample_app] Error 1 make[1]: *** [apps/slam/CMakeFiles/sample_app.dir/all] Error 2 make: *** [all] Error 2
My cmake flags are -DCMAKE_BUILD_TYPE=Release -DBUILD_CSPARSE=ON
Not sure if it is a link problem using g2o on mac
Does anyone have the same problem?
The text was updated successfully, but these errors were encountered: