-
Notifications
You must be signed in to change notification settings - Fork 767
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
Linking errors on MSVC (2017 Community) #86
Comments
I think I have fixed this issue ... I will push up my changes after I am done testing and then hopefully close this issue, but wanted to get some thoughts/questions out there. The primary source of error was LieVector, LieScalar, and LieMatrix. Because there are no .cpp files associated with these classes, the test and wrapper functions complained during compile as they try to call the functions in these header files. I can fix all the compilation problems (everything builds, but I haven't tried the generated MATLAB toolbox yet ... waiting on a re-compile) by simply removing these three files from all the CMakeLists.txt files and from any file that tries to call them. BUT, it disturbs me that everything compiles in Linux, even with the headers for these classes but not the .cpp files. Why does Linux compile without LieVector, LieScalar, or LieMatrix.cpp (and pass all the tests, including testLieMatrix) when there are no .cpp files defining what those classes are? Thoughts? |
Pull request #87 closes this issue... |
PR #87 is not the right fix, see my comment there... |
Fixed with most recent PR #87 that is in the develop branch now. |
b80bc63cf Merge pull request #90 from borglab/fix/tpl_dependency 015b12da5 Merge pull request #86 from borglab/feature/optionalargs 362851980 address review comments e461ca50e Merge pull request #89 from borglab/fix/template_iostream 2d413db57 add pybind cpp generation dependency on tpl file 79881c25e include pybind11 iostream for ostream_redirect in example tpl 5e8323c25 fix test fixture 95495726a Merge branch 'master' into feature/optionalargs 5af826840 clean up the _py_args_names method to reduce copy-pasta 844ff9229 add identifier parsing to _type c3adca7a4 remove extra spaces from Type repr 350b531d7 slight test improvement fd4f37578 cleaner default argument parsing 6013deacb overpowered default argument parsing rule dbcda0ea2 fix unit tests for __repr__ ref vs ptr 1c23c42e4 fix pointer vs const ref in __repr__ 9b40350f1 update matlab tests df7e9023c handle __repr__ with default arguments 092ef489b update pybind_wrapper for default arguments 3a2d7aa8a unit test default argument pybind 61a2b114e implement default argument parser c2b92ffec unit test for parsing default arguments git-subtree-dir: wrap git-subtree-split: b80bc63cf466f9751e8059c0abb4a4d73b23efbe
Description
In MSVC 2017 (Community), including the gtsam library causes linking errors. Specifically, gstam_matlab_wrapper, testLieMatrix, testLieVector, testLieScalar, and testMatrix does not finish compiling. During the linking phase, 100s of errors are generated, but they all have to do with an "unresolved external symbol __declspec(dllimport)" and it talks about Eigen. An example error:
Steps to reproduce
Expected behavior
Code completes compiling without errors
Environment
Windows 10, Visual Studio 2017 Community, Boost 1.67. Errors appear in DEBUG or RELEASE.
Additional information
I am not sure, but I think it has to do with something like the problem described on this webpage. Because Matrix is not declaring the size of the Matrix up front, then you have a not fully defined type being used as an interface to a dll. That is my best guess though and I have never dug into how dlls work on Windows.
The text was updated successfully, but these errors were encountered: