Compiling win_ros hydro on Windows7 64bit with VS2013 x64
Again, not really a question but a step-by-step rundown. However, if anyone spots inconsistencies or can suggest improvements, i'm all ears.
- 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:- “six”: ‘easy_install six’
- empy: ‘easy_install empy’
- Compile dependencies:
- 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. - 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) - 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. - boost 1.47. I wrote a separate post about it http://answers.ros.org/question/196131/compiling-boost147-on-windows7-64bit-with-vc2013-x64/
- 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.
- tinyxml 2.6.2: http://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/
- Follow instructions “2.1 Prerequisites” on win_ros page: http://wiki.ros.org/win_ros/hydro/Msvc%20Compiled%20SDK
- 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
- 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
- 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 ...
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.
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.
Okey that's why. I got it, thank you Eugene.
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.
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: UuidCreatem01, 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...
Update: I was able to resolve the issue. I outlined the solution here: http://answers.ros.org/question/22992...
Yeah, I didn't hit the problem you faced.. Thanks for coming back and adding pointers to the answer!