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

Compiling the unicycle footstep planner in windows #12

Closed
mebbaid opened this issue May 23, 2018 · 5 comments
Closed

Compiling the unicycle footstep planner in windows #12

mebbaid opened this issue May 23, 2018 · 5 comments

Comments

@mebbaid
Copy link
Contributor

mebbaid commented May 23, 2018

The following error is met:
unicycleerror
This is basically due to the CMakeLists.txt looking for a .lib extensions, because target_link_libraries doesn't find the associated UnicyclePlanner.lib. One reason would be, I suspect, that the declarative __declspec(dllexport) was not used, and hence the project only builds the .dll file.

One can instead build the project as a static lib and in that case the above error will not be met, but I am not certain what are the implications of that.

@traversaro
Copy link
Member

One reason would be, I suspect, that the declarative __declspec(dllexport) was not used, and hence the project only builds the .dll file.

Exactly. See ros/urdfdom#42 for a similar issue.

As documented in the how-to-export-cpp-library I suggest to:

@traversaro
Copy link
Member

@mebbaid Feel free to open a PR with one or even better both of this changes, that @S-Dafarra can review and eventually accept.

@mebbaid mebbaid mentioned this issue May 23, 2018
@mebbaid
Copy link
Contributor Author

mebbaid commented May 23, 2018

@traversaro maybe it is strange, but actually it compiled without errors, without having to remove shared
and generated the necessary static libs to link against the .dll objects. an insight into why this is the case would be appreciated.
Edited to add: after option(BUILD_SHARED_LIBS "Build libraries as shared as opposed to static" ON)

@traversaro
Copy link
Member

@traversaro maybe it is strange, but actually it compiled without errors, without having to remove shared
and generated the necessary static libs to link against the .dll objects. an insight into why this is the case would be appreciated.

The problem of the missing exported symbols was fixed by setting the CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS . The option(BUILD_SHARED_LIBS ...) and removing SHARED from add_library part are necessary to give to the user the freedom to compile the library as static, but they do not change the fact that by default the library is compiled as shared.

@S-Dafarra
Copy link
Collaborator

Solved with #13

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