Author Topic: problem running PCL project  (Read 8330 times)

Offline fastkit

  • Single posting newcomer
  • *
  • Posts: 5
problem running PCL project
« on: December 08, 2013, 08:13:01 pm »
Hi all,
I installed PCL on my computer with Ubuntu 12.04 LTS. I followed instructions found here: http://pointclouds.org/downloads/linux.html

I wanted to try the first tutorial found here: http://pointclouds.org/documentation/tutorials/writing_pcd.php#writing-pcd

Then I typed this commands on terminal to generate CodeBlocks project:
Code
cmake -G"CodeBlocks - Unix Makefiles" /home/.../dev/PCL/CMakeLists.txt
and I got the CodeBlocks project. I compiled it without errors, but when I try to run it says: You can't "run" a commands-only target...

What is the problem with CodeBlocks?

Thank you a lot in advance!!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7603
    • My Best Post
Re: problem running PCL project
« Reply #1 on: December 08, 2013, 08:30:20 pm »
Post the full re-build log. This means make sure Compiler log is on full (as in link) and do a re-build and post the "build log"

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: problem running PCL project
« Reply #2 on: December 08, 2013, 09:59:42 pm »
Hi all,
I installed PCL on my computer with Ubuntu 12.04 LTS. I followed instructions found here: http://pointclouds.org/downloads/linux.html

I wanted to try the first tutorial found here: http://pointclouds.org/documentation/tutorials/writing_pcd.php#writing-pcd

Then I typed this commands on terminal to generate CodeBlocks project:
Code
cmake -G"CodeBlocks - Unix Makefiles" /home/.../dev/PCL/CMakeLists.txt
and I got the CodeBlocks project. I compiled it without errors, but when I try to run it says: You can't "run" a commands-only target...

What is the problem with CodeBlocks?

Thank you a lot in advance!!
It's most likely not a problem with Code::Blocks, but with the cmake-generated project-file.
Try to change the type of the project in "Project -> Properties -> Build targets" for the problematic build targets and fix the patha nd name of the executable (if needed).
If this works the cmake conf-file is not correct and generates a command-only-target instead of console or gui or whatever you need.

Offline fastkit

  • Single posting newcomer
  • *
  • Posts: 5
Re: problem running PCL project
« Reply #3 on: January 13, 2014, 07:05:44 am »
Sorry,   ??? ???
I don't understand what do you mean.

Which log do I have to show? I to get it?

P.S.: Sorry, for long I didn't use this machine!


Offline fastkit

  • Single posting newcomer
  • *
  • Posts: 5
Re: problem running PCL project
« Reply #5 on: January 14, 2014, 05:40:06 am »
I got this:

Code
-------------- Build: all in Project ---------------

Running command: /usr/bin/make -f "/home/.../PCL/Makefile"  VERBOSE=1 all
/usr/bin/cmake -H/home/.../PCL -B/home/.../PCL --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/.../PCL/CMakeFiles /home/.../PCL/CMakeFiles/progress.marks
/usr/bin/make -f CMakeFiles/Makefile2 all
make[1]: ingresso nella directory "/home/.../PCL"
/usr/bin/make -f CMakeFiles/pcd_write_test.dir/build.make CMakeFiles/pcd_write_test.dir/depend
make[2]: ingresso nella directory "/home/.../PCL"
cd /home/.../PCL && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/.../PCL /home/.../PCL /home/saverio/Sviluppo/PCL/CMakeFiles/pcd_write_test.dir/DependInfo.cmake --color=
make[2]: uscita dalla directory "/home/.../PCL"
/usr/bin/make -f CMakeFiles/pcd_write_test.dir/build.make CMakeFiles/pcd_write_test.dir/build
make[2]: ingresso nella directory "/home/.../PCL"
make[2]: Nessuna operazione da eseguire per "CMakeFiles/pcd_write_test.dir/build".
make[2]: uscita dalla directory "/home/.../PCL"
/usr/bin/cmake -E cmake_progress_report /home/.../PCL/CMakeFiles  1
[100%] Built target pcd_write_test
make[1]: uscita dalla directory "/home/.../PCL"
/usr/bin/cmake -E cmake_progress_start /home/.../PCL/CMakeFiles 0
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings

So, how to solve?

Offline fastkit

  • Single posting newcomer
  • *
  • Posts: 5
Re: problem running PCL project
« Reply #6 on: January 14, 2014, 06:12:36 am »
I run it using the terminal:

Code
make
[100%] Built target pcd_write_test
***@asusM51se:~/.../PCL$ ./pcd_write_test
Saved 5 data points to test_pcd.pcd.
    0.352222 -0.151883 -0.106395
    -0.397406 -0.473106 0.292602
    -0.731898 0.667105 0.441304
    -0.734766 0.854581 -0.0361733
    -0.4607 -0.277468 -0.916762

It works well.
So there is a problem in the setting of CB. Could you help me to understand why I get this error?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: problem running PCL project
« Reply #7 on: January 14, 2014, 06:18:38 am »
So there is a problem in the setting of CB. Could you help me to understand why I get this error?
A good start would be to read all answers you get.
Not doing so only frustrates the people who take their (spare-)time to help you (in this case me):
[...]
 You can't "run" a commands-only target...

What is the problem with CodeBlocks?
It's most likely not a problem with Code::Blocks, but with the cmake-generated project-file.
Try to change the type of the project in "Project -> Properties -> Build targets" for the problematic build targets and fix the patha nd name of the executable (if needed).
If this works the cmake conf-file is not correct and generates a command-only-target instead of console or gui or whatever you need.

Offline fastkit

  • Single posting newcomer
  • *
  • Posts: 5
Re: problem running PCL project
« Reply #8 on: January 16, 2014, 07:00:02 am »
It's most likely not a problem with Code::Blocks, but with the cmake-generated project-file.
Try to change the type of the project in "Project -> Properties -> Build targets" for the problematic build targets and fix the patha nd name of the executable (if needed).
If this works the cmake conf-file is not correct and generates a command-only-target instead of console or gui or whatever you need.

I already followed your suggestion but without success. I went to Project -> Properties -> Build targets but I don't know how to do this: 'for the problematic build targets and fix the patha nd name of the executable (if needed)'

What do I exactly have to do?