Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

can`t run cpp file

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
annakri
Posts: 1
Joined: 2018-01-30 14:30

can`t run cpp file

#1 Post by annakri »

I am an absolute beginner. So pls at least try to be nice with your answer! :)
I want to run a .cpp ( can`t attach it as it is not allowed pcd_viewer.cpp)file but there are some problems as you can see in the make file

/usr/include/c++/6/bits/basic_string.h: In instantiation of ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits , _Alloc>::append(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’: /usr/include/c++/6/bits/basic_string.h:4985:7: required from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic _string<_CharT, _Traits, _Alloc>&, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ /usr/include/c++/6/system_error:343:30: required from here /usr/include/c++/6/bits/basic_string.h:1129:17: error: ‘_M_check_length’ was not declared in this scope _M_check_length(size_type(0), __n, "basic_string::append"); ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/6/bits/basic_string.h:1130:18: error: ‘_M_append’ was not declared in this scope return _M_append(__s, __n); ~~~~~~~~~^~~~~~~~~~ /usr/include/c++/6/bits/basic_string.h: In instantiation of ‘void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char ; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’: /usr/include/c++/6/bits/basic_string.h:1062:2: required from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Tra its, _Alloc>::operator+=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ /usr/include/eigen3/Eigen/src/Core/IO.h:67:20: required from here /usr/include/c++/6/bits/basic_string.h:1182:25: error: ‘class std::__cxx11::basic_string<char>’ has no member named ‘capacity’ if (__size + 1 > this->capacity()) ~~~~~~^~~~~~~~ /usr/include/c++/6/bits/basic_string.h:1183:10: error: ‘class std::__cxx11::basic_string<char>’ has no member named ‘_M_mutate’; did you mean ‘_M_data’? this->_M_mutate(__size, size_type(0), 0, size_type(1)); ~~~~~~^~~~~~~~~ /usr/include/c++/6/bits/basic_string.h:1185:8: error: ‘class std::__cxx11::basic_string<char>’ has no member named ‘_M_set_length’ this->_M_set_length(__size + 1); ~~~~~~^~~~~~~~~~~~~ CMakeFiles/pcd_viewer.dir/build.make:62: recipe for target 'CMakeFiles/pcd_viewer.dir/pcd_viewer.cpp.o' failed make[2]: *** [CMakeFiles/pcd_viewer.dir/pcd_viewer.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pcd_viewer.dir/all' failed make[1]: *** [CMakeFiles/pcd_viewer.dir/all] Error 2

Can anyone help? I will provide any further information needed upon request!

Thanks

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: can`t run cpp file

#2 Post by GarryRicketson »

I am an absolute beginner.
No problem, we all were beginners when we started.
First off, learn how to use code boxes. Attachments, How to post a screen shot and use code boxes

Also , it would help if you explain where Debian comes into all of this,includeing the version you are using. If it is not Debian, please tell us what distro it is.
========== edited ==========
Postby annakri » 2018-01-30 08:35
I am an absolute beginner.
As a absolute beginner you will need to learn a lot of basic things, before jumping into advanced tasks like compiling and installing programs, there are many tools available , learn how to use them. The most use full tool that absolute beginners seem to not know how to use is called a "search engine" , learn how to use it.
How do I run a cpp file on Debian
So pls at least try to be nice with your answer! :)
We are all ways nice with our answers. If we wanted to be mean we would just delete the questions like they do on stack exchange. At least here some one will take the time to try to point you in the right direction, even hold your hand when you first stand up and start learning to walk. First though , you need to at least learn to crawl. :mrgreen:
Last edited by GarryRicketson on 2018-01-30 23:32, edited 1 time in total.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: can`t run cpp file

#3 Post by stevepusser »

Please explain where that c++ file came from, what command you gave to try and "run" it, and what version of Debian you are running. Then maybe we can get a start on this. Spamming a bunch of code into a first post is not going make a good first impression.

This post seem more like a programming issue to me, since it's showing a compiler error.

Sometimes those errors can be fixed by using different compiler flags, but that's getting into intermediate territory.
MX Linux packager and developer

Post Reply