Stack Exchange
Point Cloud Library and Visual Studio 2010
I've been trying to compile some simple code for point cloud, I believe I've included the relevant h files and libs but visual studio just seems to be giving me this:

My include directories (in VC++ directories property page):

C:\Program Files %28x86%29\OpenNI\Include\Win32;C:\Program Files %28x86%29\OpenNI\Include;C:\Program Files (x86)\PCL 1.6.0\3rdParty\VTK\include\vtk-5.8;C:\Program Files %28x86%29\PCL 1.6.0\3rdParty\Qhull\include;C:\Program Files %28x86%29\PCL 1.6.0\3rdParty\FLANN\include;C:\Program Files %28x86%29\PCL 1.6.0\3rdParty\Eigen\include;C:\Program Files %28x86%29\PCL 1.6.0\3rdParty\Boost\include;C:\Program Files %28x86%29\PCL 1.6.0\include\pcl-1.6;$(IncludePath);$(WindowsSdkDir)\lib;C:\Program Files (x86)\PCL 1.6.0\lib

Library Directories (VC++ directories property page):

C:\Program Files %28x86%29\OpenNI\Lib;$(LibraryPath)

Additional Include DIrectories (from C/C++ property page):

C:\Program Files %28x86%29\OpenNI\Lib;$(LibraryPath)

Additional Library Dependencies (from Linker property page):

C:\Program Files (x86)\PCL 1.6.0\3rdParty\FLANN\lib;C:\Program Files %28x86%29\OpenNI\Lib;C:\Program Files (x86)\PCL 1.6.0\3rdParty\VTK\lib\vtk-5.8;C:\Program Files (x86)\PCL 1.6.0\3rdParty\Qhull\lib;C:\Program Files (x86)\PCL 1.6.0\lib;$(WindowsSdkDir)\lib;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;C:\Program Files (x86)\PCL 1.6.0\3rdParty\Boost\lib;C:\Program Files (x86)\OpenNI\Lib

I must have missed out an include somewhere. I presume it has to do with the OpenNI libraries as the error is mentioning the OpenNI. 
Any ideas?  
I do not want to use CMake as an alternative to VS2010.

You don't seem to be linking against the appropriate OpenNI libraries. Make sure you have specified the correct library files. That is, don't just specify the folders for the libraries, but also include them in your linker settings. P.s. do go the CMake route. It will make your life a lot easier. It's not an alternative to VS. It will merely generate a VS solution for you (if you want) with all the appropriate paths and library settings.

OK. I've tried a very simple CMakeList
http://pointclouds.org/documentation/tutorials/using_pcl_pcl_config.php
When I tried compiling in visual studio, 1 of the builds fail saying that they cannot find FLANN. So I manually added FLANN variables, but when I generate in CMake, I get a warning saying none of the manual additions of FLANN were used. I had to add FLANN include inside C/C++ additional include directories. Once I did that I got the same error as before! I've tracked it down to the line
OpenNIIntegralImageNormalEstimationpcl::PointXYZRGBA v("")
Any further ideas?

I also tried a CMakeList from http://svn.pointclouds.org/pcl/trunk/CMakeLists.txt
But fails at DISSECT_VERSION(). It seems it doesn't know this function. I've got PCL 1.6.0.

I lie, the errors have changed, but still externals (so linkage). Any idea which linkage this is?
http://gyazo.com/70697155f17dc814f42829af234312f8

There are various ones. The first one for example leads to the features library. In CMake you could link against that by adding ${PCL_FEATURES_LIBRARIES} to your target_link_libraries. Were you ever able to correctly compile and run a PCL program? I would highly recommend you go through some of the tutorials: http://pointclouds.org/documentation/tutorials/

I can compile a PCL program, and I've had a look over the tutorials but there is nothing obvious to solve my linker problem. I tired what you suggested, but it hasn't helped. I cannot figure out what I need to link. Before anyelse suggests it, I am running 32bit VS2010, PCL library and 3rd party component libraries. Out of interest, how I do explicitly add FLANN in the CMakeList.txt?

If everything is configured well, you shouldn't have to do so. You could simply try to link against everything by using ${PCL_LIBRARIES} in your target_link_libraries. If that doesn't fix it for you, have a look at your CMakeCache.txt and the FLANN specific entries in there. See if the paths are correct. If not, your setup is not properly configured. Try to narrow down the problem to a CMakeLists.txt that is as simple as possible and perhaps a very minimal code example. And you can always ask us on http://www.pcl-users.org/ for a more targeted audience.

I checked the cache file, but no FLANN. I tried manually adding the FLANN_INCLUDE_DIR, FLANN_LIBRARY etc inside of CMake, but when I generate I a warning saying the vairables are not used: http://gyazo.com/72f8ad1381432b9d6248207e5562c081

check:
http://stackoverflow.com/questions/18734643/please-help-cannot-compile-point-cloud-library/18743478#18743478
