-
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
Some examples do not work when building g2o to static libraries #58
Comments
I met the same problem. |
I have the same problem, I was thinking the different version of g2o wasn't compatible. But I remove all files, and reinstall g2o again, it still doesn't work well. |
A classic problem with static linking... compiler optimizes out what it thinks is not used, which is a problem with class factories. The origin of the problem is this:
The factory returns
The trick used in I know of this problem because I had to switch to a more complex auto-registration macro for a project of mine.
Cheers! |
Hi, I am sorry. I do not understand how to implement something like MRPT_INITIALIZER() in G2O. Thank you! |
do like this
} // end namespace |
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 Rainer,
Thank you for the great g2o work and I am trying to use it.
Are you aware of that some examples do not work when building g2o to static libraries (.a files). For example, I got a bunch of errors of tutorial_slam2d
fatal error in creating cache of type TUTORIAL_CACHE_SE2_OFFSET
addEdge: FATAL, cannot resolve caches for edge 0x23416e0
g2o::Cache* g2o::CacheContainer::createCache(const g2o::Cache::CacheKey&)
fatal error in creating cache of type TUTORIAL_CACHE_SE2_OFFSET
addEdge: FATAL, cannot resolve caches for edge 0x23419a0
...
cmake commands: $cmake -DBUILD_SHARED_LIBS=OFF ../
OS: Ubuntu 14.04
Build to shared libraries are completely perfect and all the examples work well. Do you have an idea what is the possible reasons for it? Thanks
XQ
The text was updated successfully, but these errors were encountered: