building PCL 1.7 in Visual Studio 2012

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

building PCL 1.7 in Visual Studio 2012

gx43
This post was updated on .
Hi,

I have a problem building PCL 1.7 in MSVC 2012. I have built everything from source without any important issue but when I try to build PCL (downloaded from trunk) in MSVC, I get the following result:

Build: 5 succeeded, 86 failed, 16 up-to-date, 4 skipped

For the installation/building process I followed the instructions in these sites:

http://pointclouds.org/documentation/tutorials/compiling_pcl_windows.php#compiling-pcl-windows
https://bitbucket.org/manctl/pcl/src/994c2e7214cb/doc/tutorials/content/compiling_pcl_windows.rst

Some of the errors I get are the following ones:

Error 1 error C1189: #error :  Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported! c:\program files\openni\include\XnPlatform.h 58 1 pcl_io                        (repeated 14 times)
Error 15 error LNK1104: cannot open file '..\lib\pcl_io_debug.lib' C:\pcl\build64\visualization\LINK pcl_visualization                  (repeated >12 times)
Error 21 error LNK1104: cannot open file '..\lib\pcl_visualization_debug.lib' C:\pcl\build64\outofcore\LINK pcl_outofcore
Error 27 error LNK1104: cannot open file '..\..\lib\pcl_io_debug.lib' C:\pcl\build64\visualization\tools\LINK pcl_image_grabber_saver
Error 33 error C1189: #error :  Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported! c:\program files\openni\include\XnPlatform.h 58 1 pcl_hdl_viewer_simple
Error 41 error C1189: #error :  Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported! c:\program files\openni\include\XnPlatform.h 58 1 pcl_openni_viewer
Error 86 error LNK1104: cannot open file '..\..\lib\pcl_io_debug.lib' C:\pcl\build64\visualization\tools\LINK pcl_viewer
Error 101 error LNK1104: cannot open file '..\lib\pcl_io_debug.lib' C:\pcl\build64\tools\LINK pcl_train_linemod_template
............
............

The obvious is that it cannot be built because of my MSVC version, which is 2012. But I saw in the mailing list that some others managed to build it. So, I am wondering if somebody knows what is going wrong here and I cannot build it (either in Debug or Release mode).

Here is my configuration:
Win7 64bit
MSVC Premium 2012 (Version 11.0.50727) with .NET Framework installed
PCL 1.7 (from trunk)
Boost 1.51
Eigen 3.0.5
Flann 1.8.4
QHull 2012.1
VTK 5.10.1

And here is the output from configuring PCL using CMake:

Found OpenMP
Boost version: 1.51.0
Found the following Boost libraries:
  system
  filesystem
  thread
  date_time
  iostreams
Boost version: 1.51.0
Found the following Boost libraries:
  chrono
Eigen found
FLANN found
Could NOT find FZAPI (missing:  FZAPI_LIBS FZAPI_INCLUDE_DIR)
Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Could NOT find PNG (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
QHULL found
Could NOT find Qt4 (missing:  QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_LIBRARY)
Could NOT find QVTK (missing:  QVTK_LIBRARY QVTK_INCLUDE_DIR)
VTK found
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
PCAP NOT found
[pcl_keypoints] SSE4.1 status: found. Enabling BriskKeypoint2D.
DOXYGEN_FOUND NO
HTML_HELP_COMPILER
Could NOT find PythonInterp (missing:  PYTHON_EXECUTABLE)
Could NOT find Sphinx (missing:  SPHINX_EXECUTABLE)
Found CPack generators: NSIS
The following subsystems will be built:
  common
  octree
  io
  kdtree
  search
  sample_consensus
  filters
  2d
  geometry
  features
  ml
  segmentation
  visualization
  surface
  registration
  keypoints
  tracking
  recognition
  stereo
  outofcore
  tools
The following subsystems will not be built:
  apps: Disabled by default.
  examples: Code examples are disabled by default.
  simulation: Disabled by default.
  global_tests: Disabled manually.
Configuring done


Thank you in advanced.

Best,
Georg




Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

Altella
Exactly the same to me, one year later and with PCL 1.7.1 official.
My MS compiler is Visual Studio 2010 premium

thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

kwaegel
Administrator
In reply to this post by gx43
The current trunk will not build under VS2012 due to an explicit check in the OpenNI 1.x headers.

I have a experimental OpenNI 2.x based grabber in my personal repository that works fine with VS2012, but you'll need to install or build the OpenNI 2 SDK for it to work.

Altella wrote
Exactly the same to me, one year later and with PCL 1.7.1 official.
My MS compiler is Visual Studio 2010 premium
@Altella: You have a different compiler, so you must be encountering a different error. I can't help without the actual error messages. :)
Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

Altella
Thanks for your response,
as you say I am using PCL 1.7.1 official, Visual Studio 2010 Enterprise and Windows 7 x64.
Configuring Cmake, I obtain the solution for Visual Studio, and tryto build the "ALL BUILD" project.

I obtain :
========== Build: 20 succeeded, 125 failed, 0 up-to-date, 0 skipped ==========
All the errors have the same form, for many libraries:
136>
136>Time Elapsed 00:00:28.03
144>LINK : fatal error LNK1104: cannot open file '..\lib\pcl_io_debug.lib'
144>
144>Build FAILED.

Other errors:
error C2143:syntax error: missing ';' before "template<"

Another curious error is:
error LNK1104: cannot open file 'C:\Qt\4.8.0\lib\QtGuid4.lib'
Because Cmake detected my installation of Qt 4.8.4 in the configuration.

But anyway, the great mayority of errors are in the form:
error LNK1104: cannot open file".... . lib"
In debug and release configurations.

Thanks in advance,
Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

brotherxiang00
Hi, I encounter the same error when I build the PCL. Did you find some solutions?
Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

kwaegel
Administrator
In reply to this post by Altella
Altella wrote
Thanks for your response,
as you say I am using PCL 1.7.1 official, Visual Studio 2010 Enterprise and Windows 7 x64.
Configuring Cmake, I obtain the solution for Visual Studio, and tryto build the "ALL BUILD" project.

I obtain :
========== Build: 20 succeeded, 125 failed, 0 up-to-date, 0 skipped ==========
All the errors have the same form, for many libraries:
136>
136>Time Elapsed 00:00:28.03
144>LINK : fatal error LNK1104: cannot open file '..\lib\pcl_io_debug.lib'
144>
144>Build FAILED.

Other errors:
error C2143:syntax error: missing ';' before "template<"

Another curious error is:
error LNK1104: cannot open file 'C:\Qt\4.8.0\lib\QtGuid4.lib'
Because Cmake detected my installation of Qt 4.8.4 in the configuration.

But anyway, the great mayority of errors are in the form:
error LNK1104: cannot open file".... . lib"
In debug and release configurations.
Can you attach your build log? The "LNK1104: cannot open file" errors just mean that an earlier build step failed and don't explain why it failed.

The template syntax error and QtGuid4.lib errors are indeed more interesting, but it's hard to tell much about them without some context.
Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

resabz
Hi,

I am very new in using PCL (not only in PCL, but also in using cmake, msvc, ...). I would be very grateful if someone can give me a hint on how to build and compile PCL 1.7 for MSVC 2012.

I am using
 --kwaegel's PCL version downloaded a few days ago from his repository
 --CMake 2.8
 --MSVC 2012
with 3rd party libraries
 --Boost 1.55 (official binary)
 --Eigen 3.2.1
 --FLANN 1.8.4 (64bit MSVC2012 binary provided by Øystein Skotheim on http://www.edge.no/wiki/Precompiled_Libraries_64bit)
 --VTK 5.8 (I have also tried VTK 6.1) : official binaries
 --gtest 1.7
 --qhull 2012.1
 --OpenNI2 (also tried with OpenNI): used official binaries
 --QT 5.2.1 (official binary)
 --MPICH 1.4.1p1 (Jayesh Krishnas binary)
 --Intel PCSDK 2013

Building with MSVC2012-64bit, I get this error:

4>ply_parser.obj : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "public: __cdecl boost::thread_exception::thread_exception(int,char const *)" (??0thread_exception@boost@@QEAA@HPEBD@Z)
4>ply_parser.obj : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'errno_ecat''(void)" (??__Eerrno_ecat@system@boost@@YAXXZ)
.
.
.
========== Build: 16 succeeded, 105 failed, 0 up-to-date, 0 skipped ==========

Another hint which I don't have any idea about and could be related to the errors in MSVC is that when I generate the code in CMake I get many warnings for boost and a few for FLANN! Something like this:

WARNING: Target "pcl_kdtree" requests linking to directory "C:\boost_1_55_0\lib64-msvc-11.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "pcl_kdtree" requests linking to directory "C:\Program Files\flann-1.8.4\lib".  Targets may link only to libraries.  CMake is dropping the item.


Thanks,
Reza
Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

nirmou88
Reza,

Did you succeed to build PCL 1.7 with msvc 2012 ?

I am also trying to build it.

Cheers,

Mounir
Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

resabz
This post has NOT been accepted by the mailing list yet.
Hi Mounir,

Yes, I somehow managed to do it. I couldn't compile all the dependencies by myself as you can see in my post, but after struggling with iteratively compiling the dependencies by myself and using the compiled ones (with some path modifications in their *Config.cmake files) I could successfully compile PCL.

Do not hesitate to reply if you still have issues. My knowledge is limited but could be helpful to you

Best,
Reza

Reply | Threaded
Open this post in threaded view
|

Re: building PCL 1.7 in Visual Studio 2012

kennethroy999
This post was updated on .
CONTENTS DELETED
The author has deleted this message.