Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Add missing include and make libs shared#208

Merged
gerkey merged 15 commits intoros2from
fix_build2
Mar 21, 2017
Merged

Add missing include and make libs shared#208
gerkey merged 15 commits intoros2from
fix_build2

Conversation

@gerkey
Copy link
Copy Markdown

@gerkey gerkey commented Mar 14, 2017

Redo of #203, where I did something wrong with git that made the ci job no longer work.

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 14, 2017

First Windows CI attempt:

http://ci.ros2.org/job/ci_windows/2357/

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 14, 2017

This time with the header actually committed:

http://ci.ros2.org/job/ci_windows/2362/

@Karsten1987
Copy link
Copy Markdown
Collaborator

I do believe you have to "activate" the symbol export within your CMakeLists.txt:

target_compile_definitions(tf2 PRIVATE "TF2_BUILDING_DLL")

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 16, 2017

You mean that the preprocessor couldn't automatically figure out that that was my intent and just insert that definition for me? 😉

Here's the next attempt:

http://ci.ros2.org/job/ci_windows/2391/

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 16, 2017


template <class T>
TF2SIMD_FORCE_INLINE const T& tf2Min(const T& a, const T& b)
TF2_PUBLIC TF2SIMD_FORCE_INLINE const T& tf2Min(const T& a, const T& b)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to export template symbols. Templates are getting evaluated on caller side, meaning they are always in the according compilation unit.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, Inline function are meant to be not exported.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that makes sense. Clearly I'm in unfamiliar territory here. So I should remove that declaration from all the template functions? Anywhere else?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was reading about exporting and inline here:

https://msdn.microsoft.com/en-us/library/xa0d9ste.aspx

So they can be exported, but it's not clear to me whether they should or shouldn't be.

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 16, 2017

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 16, 2017

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 16, 2017

19:12:49      9>LINK : fatal error LNK1181: cannot open input file 'Release\tf2_ros.lib' [C:\J\workspace\ci_windows\ws\build\tf2_ros\static_transform_publisher.vcxproj]

Looks like tf2 is good and now tf2_ros needs the same visibility treatment. I'll get to that as soon as I can, maybe tomorrow. @Karsten1987, if you're blocked on this, feel free to jump in here and keep going without me.

@Karsten1987
Copy link
Copy Markdown
Collaborator

I thought I opened a PR with tf2_ros against your branch. Did you see it?

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 16, 2017

Sorry, I hadn't noticed that. Thanks!

http://ci.ros2.org/job/ci_windows/2400/

@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 17, 2017

It builds!

Now we need to resolve compiler warnings:

http://ci.ros2.org/job/ci_windows/2400/warnings41Result/new/

…witched from marking classes as public to marking the internal methods and static members. Let's see if this works.
@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 18, 2017

@Karsten1987
Copy link
Copy Markdown
Collaborator

Karsten1987 commented Mar 21, 2017

it looks to me as if the builds finally succeed.
Build Status

The build failure comes from two failing tests which are unrelated.

@gerkey gerkey merged commit 6cd5c04 into ros2 Mar 21, 2017
@gerkey gerkey deleted the fix_build2 branch March 21, 2017 20:28
@gerkey
Copy link
Copy Markdown
Author

gerkey commented Mar 21, 2017

Thanks for the all the help, @Karsten1987 !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants