Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
However, when I went to put in libstdc++-3.3.3-1.i686.rpm I get this:
Code:
package libgcc-4.1.0-25 (which is newer than libgcc-3.3.3-1) is already installed
file /lib/libgcc_s.so.1 from install of libgcc-3.3.3-1 conflicts with file from package libgcc-4.1.0-25
So I left it alone. So I thought I should have everything...so I tried to compile hello world:
Code:
#include <iostream>
using namespace std;
int main(void)
{
cout <<"hello"<<endl;
return 0;
}
But this is what Im getting and I can't figure out whats up:
Code:
In file included from /usr/include/c++/3.3.3/i686-redhat-linux/bits/c++config.h:35,
from /usr/include/c++/3.3.3/iostream:44,
from hello.cpp:1:
/usr/include/c++/3.3.3/i686-redhat-linux/bits/os_defines.h:39:22: features.h: No such file or directory
/usr/include/c++/3.3.3/i686-redhat-linux/bits/os_defines.h:46:23: gnu/types.h: No such file or directory
In file included from /usr/include/c++/3.3.3/i686-redhat-linux/bits/c++config.h:35,
from /usr/include/c++/3.3.3/iostream:44,
from hello.cpp:1:
/usr/include/c++/3.3.3/i686-redhat-linux/bits/os_defines.h:47: error: syntax
error before `;' token
In file included from /usr/include/c++/3.3.3/i686-redhat-linux/bits/c++locale.h:41,
from /usr/include/c++/3.3.3/iosfwd:46,
from /usr/include/c++/3.3.3/ios:44,
from /usr/include/c++/3.3.3/ostream:45,
from /usr/include/c++/3.3.3/iostream:45,
from hello.cpp:1:
/usr/include/c++/3.3.3/clocale:49:20: locale.h: No such file or directory
In file included from /usr/include/c++/3.3.3/i686-redhat-linux/bits/c++locale.h:41,
from /usr/include/c++/3.3.3/iosfwd:46,
from /usr/include/c++/3.3.3/ios:44,
from /usr/include/c++/3.3.3/ostream:45,
from /usr/include/c++/3.3.3/iostream:45,
from hello.cpp:1:
/usr/include/c++/3.3.3/clocale:57: error: `lconv' not declared
/usr/include/c++/3.3.3/clocale:58: error: `setlocale' not declared
/usr/include/c++/3.3.3/clocale:59: error: `localeconv' not declared
In file included from /usr/include/c++/3.3.3/iosfwd:46,
from /usr/include/c++/3.3.3/ios:44,
from /usr/include/c++/3.3.3/ostream:45,
from /usr/include/c++/3.3.3/iostream:45,
from hello.cpp:1:
/usr/include/c++/3.3.3/i686-redhat-linux/bits/c++locale.h:42:47: langinfo.h: No such file or directory
/usr/include/c++/3.3.3/i686-redhat-linux/bits/c++locale.h:43:68: iconv.h: No such file or directory
/usr/include/c++/3.3.3/i686-redhat-linux/bits/c++locale.h:44:48: libintl.h: No such file or directory
In file included from /usr/include/c++/3.3.3/iosfwd:46,
from /usr/include/c++/3.3.3/ios:44,
from /usr/include/c++/3.3.3/ostream:45,
from /usr/include/c++/3.3.3/iostream:45,
from hello.cpp:1:
/usr/include/c++/3.3.3/i686-redhat-linux/bits/c++locale.h:59: error: syntax
error before `;' token
/usr/include/c++/3.3.3/i686-redhat-linux/bits/c++locale.h:73: error: parse
and so on...
Can someone please help me? Its driving me mad....
If you go to RPM Search and put gcc-4.1.0-25 in the search field, you'll get links to the packages which are for Open Suse. The package you have installed --> libgcc-4.1.0-25, is also for Open Suse acording to RPM Search.
Ive managed to install all what I thought I needed but now I'm getting these errors:
Code:
# gcc hello.cpp
hello.cpp:9:2: warning: no newline at end of file
/tmp/ccfq9VLJ.o: In function `__static_initialization_and_destruction_0(int, int)':
hello.cpp:(.text+0x23): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccfq9VLJ.o: In function `__tcf_0':
hello.cpp:(.text+0x6c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccfq9VLJ.o: In function `main':
hello.cpp:(.text+0x8e): undefined reference to `std::cout'
hello.cpp:(.text+0x93): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
hello.cpp:(.text+0x9b): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
hello.cpp:(.text+0xa3): undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'
/tmp/ccfq9VLJ.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Ive managed to install all what I thought I needed but now I'm getting these errors:
Code:
# gcc hello.cpp
hello.cpp:9:2: warning: no newline at end of file
/tmp/ccfq9VLJ.o: In function `__static_initialization_and_destruction_0(int, int)':
hello.cpp:(.text+0x23): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccfq9VLJ.o: In function `__tcf_0':
hello.cpp:(.text+0x6c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccfq9VLJ.o: In function `main':
hello.cpp:(.text+0x8e): undefined reference to `std::cout'
hello.cpp:(.text+0x93): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
hello.cpp:(.text+0x9b): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
hello.cpp:(.text+0xa3): undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'
/tmp/ccfq9VLJ.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.