0
$\begingroup$

Rosanswers logo

I want to run a simple PCL program, but it gave error like "Unable to start program c:\GrabPCD\build_pcl\x64\Debug\All_build The system can`t find the file specified."

I am using Windows7 MSVC2010.

#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>

int
  main (int argc, char** argv)
{
  pcl::PointCloud<pcl::PointXYZ> cloud;

  // Fill in the cloud data
  cloud.width    = 5;
  cloud.height   = 1;
  cloud.is_dense = false;
  cloud.points.resize (cloud.width * cloud.height);

  for (size_t i = 0; i < cloud.points.size (); ++i)
  {
    cloud.points[i].x = 1024 * rand () / (RAND_MAX + 1.0f);
    cloud.points[i].y = 1024 * rand () / (RAND_MAX + 1.0f);
    cloud.points[i].z = 1024 * rand () / (RAND_MAX + 1.0f);
  }

  pcl::io::savePCDFileASCII ("test_pcd.pcd", cloud);
  std::cerr << "Saved " << cloud.points.size () << " data points to test_pcd.pcd." << std::endl;

  for (size_t i = 0; i < cloud.points.size (); ++i)
    std::cerr << "    " << cloud.points[i].x << " " << cloud.points[i].y << " " << cloud.points[i].z << std::endl;

  return (0);
}

Originally posted by Nihad on ROS Answers with karma: 22 on 2013-03-30

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You should set the startup project that will be launched when you click F5 in Visual Studio. By default, the startup project is ALL_BUILD. right click on the project you want in the solution explorer, and choose "set as startup project".


Originally posted by hiranya with karma: 104 on 2013-03-31

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Nihad on 2013-03-31:
Thank you. It works fine.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.