ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

Compiling win_ros hydro on Windows7 64bit with VS2013 x64

asked 2014-10-29 10:51:03 -0600

Eugene Simine gravatar image

Again, not really a question but a step-by-step rundown. However, if anyone spots inconsistencies or can suggest improvements, i'm all ears.

  1. Install Python and winros packages I installed 64 bit version of Python2.7.5 and then went down the list of packages given here:
    www.ros.org/wiki/win_python_build_tools/hydro
    and installed 64 bit version where possible. In many of those packages i had to manually specify Python installation directory because it couldn't find it in the registry. The only package i skipped was PySvn but that didn't seem to matter. Extra Python packages i needed to install:
    1. “six”: ‘easy_install six’
    2. empy: ‘easy_install empy’
  2. Compile dependencies:
    1. tinyxml 2.6.2: http://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/
      make sure you set /MD(Multi-threaded DLL) flag in C++/Code Generation and also add TIXML_USE_STL to Preprocessor Definitions. There are 4 projects in the solution and 3 of them will fail to compile but all you need is tinyxml project and that’s the one that compiles without errors.
    2. bzip2 1.0.6: http://www.bzip.org/downloads.html
      set the values of Linker:General:Output File to bzip2.dll ( bzip2d.dll for debug version if you wish) and Linker:Advanced:Import LIbrary to .\Release\bzip2.lib (.\Debug\bzip2d.lib)
    3. log4cxx 0.10.0. This bugger will give you some trouble but not to worry, here’re some decent instructions on how to wrestle with this project: https://blog.lextudio.com/2010/09/how-to-build-log4cxx-in-visual-studio-2010/
      Just make sure you download apr-1.5.1-win32-src.zip and not the old version as it suggests. It works the same for VC2013 but you do need to go into the code and move stuff around. I think i got away with just moving all LOG4CXX_LIST_DEF macros outside of the class declarations and fixing KeySet declarations.
    4. boost 1.47. I wrote a separate post about it http://answers.ros.org/question/196131/compiling-boost147-on-windows7-64bit-with-vc2013-x64/
    5. I found it useful to check the compiled libraries and make sure that they are built with the right compiler and are linked to correct libraries. You can use Dependency Walker to do that. http://www.dependencywalker.com/ You want to make sure that you are linking against MSVCP120.DLL and such.
  3. Follow instructions “2.1 Prerequisites” on win_ros page: http://wiki.ros.org/win_ros/hydro/Msvc%20Compiled%20SDK
  4. Since i’m building everything in x64 i’ve made a copy of C:\opt\rosdeps\hydro\x86 and renamed it x64 so that all my dependencies are now in C:\opt\rosdeps\hydro\x64
  5. Replace all .libs and .dlls in C:\opt\rosdeps\hydro\x64\bin and C:\opt\rosdeps\hydro\x64\lib with the libraries we compiled in the previous steps and add both of these folder to your $PATH
  6. Modify Boost-debug.cmake in C:\opt\rosdeps\hydro\x64\lib so that the names of boost libraries match those of your newly compiled boost dlls. (Find&Replace works very well here). Ex: change boost_date_time-vc-mt-1_47.dll to boost_date_time-mt ...
(more)
edit retag flag offensive close merge delete

Comments

Thank for this little guide Eugene ! Just a little question, is the tutorial provided on ROS about win_ros work also ? Because I've followed it and I think everything work properly.

lilouch gravatar image lilouch  ( 2015-04-20 21:24:51 -0600 )edit

I would assume you mean this page: win_ros wiki. Yes the instructions there should be correct. However at the time of writing this post there was only 32bit version of the precompiled libs for win_ros but i needed x64 compilation.

Eugene Simine gravatar image Eugene Simine  ( 2015-04-21 09:06:37 -0600 )edit

Okey that's why. I got it, thank you Eugene.

lilouch gravatar image lilouch  ( 2015-04-21 19:48:43 -0600 )edit

Instead of using the old version of Boost, I used 1.59.0. That seems to compile fine with VS2013 in x64 mode. These steps were very helpful, thanks for writing them down.

m01 gravatar image m01  ( 2016-01-02 09:20:50 -0600 )edit

To build log4cxx, I had to make one more change.. right click the log4cxx project->properties, navigate to configuration properties -> linker -> command line, and add "Rpcrt4.lib" (without quotation marks). This resolves the linker error: LNK2019: unresolved external symbol re: UuidCreate

m01 gravatar image m01  ( 2016-01-10 05:57:57 -0600 )edit

m01, Can you please elaborate on how you compiled ROS with Boost 1.59? I tried with 1.56 and 1.59, but always get the following error when linking rospack.dll: rospack.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem3::path_traits::convert...

Atlancer gravatar image Atlancer  ( 2016-03-23 03:11:47 -0600 )edit

Update: I was able to resolve the issue. I outlined the solution here: http://answers.ros.org/question/22992...

Atlancer gravatar image Atlancer  ( 2016-03-24 22:06:10 -0600 )edit

Yeah, I didn't hit the problem you faced.. Thanks for coming back and adding pointers to the answer!

m01 gravatar image m01  ( 2016-03-25 04:08:40 -0600 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2014-11-18 09:06:03 -0600

mikegulf gravatar image

Eugene,

Thanks for the instructions. I was finally able to get everything to compile and run under MSVC2010. Log4cxx took a bit and I got some help from Seve in the comments on https://blog.lextudio.com/2010/09/how... as my solution would not compile. I had to change his preprocessor definition from LOG4CXX_STATIC to LOG4CXX so it would compile both the dll and lib. I went ahead and posted a link to the precompiled 64 bit rosdeps on the previous page. One of the things that did have me baffled for a while after I compiled everything is that I could not get anything to run. It turns out that I did not have a env variable for ROS_PACKAGE_PATH or PYTHONPATH. Once those were complete everything worked like a charm.

Thanks Ralph

edit flag offensive delete link more

Comments

Nice. Glad it helped and thanks for posting your corrections.

Eugene Simine gravatar image Eugene Simine  ( 2014-11-20 13:42:38 -0600 )edit
1

answered 2015-04-15 11:37:52 -0600

sashanicolas gravatar image

Hi Eugene,

We're trying to follow your step, and man, you did a great job over there. We're now wondering though if you compiled the WinRos Python Build Tools 0.2.5 for x64. And what about wget, did you compiled for 64 bit or used 32 bit version?

Thanks in advance

edit flag offensive delete link more

Comments

1

Thanks. I hope you got it working. I didn't bother with either build tools or wget since all i really needed was basic ROS functionality so that i could talk to nodes from my MSVC project. So in our setup roscore and most of the nodes actually ran on Ubuntu

Eugene Simine gravatar image Eugene Simine  ( 2015-04-15 15:11:44 -0600 )edit

I compiled the winros python build tools for x64. It's actually pretty simple: get the link to the source code from the win_python_build_tools page, git clone that repository onto your PC, cd to rosdeps/win_python_build_tools and run .\make.bat install

m01 gravatar image m01  ( 2016-01-02 08:48:55 -0600 )edit

.. continued.. IIRC that command will build the x64 msi installer in one of the subdirectories. Then just run that installer, and it'll install the Python tools.

m01 gravatar image m01  ( 2016-01-02 08:49:46 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2014-10-29 10:51:03 -0600

Seen: 4,239 times

Last updated: Nov 18 '14