public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Error after installing new version of gcc
@ 2010-03-12 16:57 Jangid
  2010-03-12 17:28 ` John (Eljay) Love-Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: Jangid @ 2010-03-12 16:57 UTC (permalink / raw)
  To: gcc-help


I have installed Fedora 12 recently and compiled my already running
application in c++.

After compiling in newly installed OS I got huge error list, these errors
are common 
e.g.
error: ‘std::memchr’ is not a member of ‘std’
error: ‘std::sprintf’ has not been declared
error: ‘std::strcmp’ has not been declared
error: ‘std::strlen’ has not been declared
error: ‘std::memcpy’ has not been declared
error: ‘std::memset’ has not been declared
error: ‘std::strerror’ has not been declared

I am not getting these error in old version
here is old gcc version is 
Using built-in specs. Target: x86_64-redhat-linux Configured with:
../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=x86_64-redhat-linux Thread model: posix gcc version 4.1.2 20080704
(Red Hat 4.1.2-46) 

------------------------------------
new gcc version
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC)

-----------------------------

Any clue to fix these issue without changing my source code??

Thanks in advance

-Manoj

-- 
View this message in context: http://old.nabble.com/Error-after-installing-new-version-of-gcc-tp27879757p27879757.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Error after installing new version of gcc
  2010-03-12 16:57 Error after installing new version of gcc Jangid
@ 2010-03-12 17:28 ` John (Eljay) Love-Jensen
  2010-03-12 17:38   ` Jangid
  0 siblings, 1 reply; 4+ messages in thread
From: John (Eljay) Love-Jensen @ 2010-03-12 17:28 UTC (permalink / raw)
  To: Jangid, gcc-help

Hi Jingid,

Works for me.

Are you sure you are including the C++ headers, and not the C headers, in your C++ source code?

// C++ header for:
// std::sprintf, std::strerror
#include <cstdio> // Not the C header <stdio.h>

// C++ header for:
// std::strlen, std::memchr, std::strcmp, std:memcpy, std::memset
#include <cstring> // Not the C header <string.h>

Sincerely,
--Eljay

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Error after installing new version of gcc
  2010-03-12 17:28 ` John (Eljay) Love-Jensen
@ 2010-03-12 17:38   ` Jangid
  2010-03-12 19:12     ` John (Eljay) Love-Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: Jangid @ 2010-03-12 17:38 UTC (permalink / raw)
  To: gcc-help


yeah its work with these c++ headers but Important thing is its working in my
older version without any issue.

-Manoj 


John (Eljay) Love-Jensen wrote:
> 
> Hi Jingid,
> 
> Works for me.
> 
> Are you sure you are including the C++ headers, and not the C headers, in
> your C++ source code?
> 
> // C++ header for:
> // std::sprintf, std::strerror
> #include <cstdio> // Not the C header <stdio.h>
> 
> // C++ header for:
> // std::strlen, std::memchr, std::strcmp, std:memcpy, std::memset
> #include <cstring> // Not the C header <string.h>
> 
> Sincerely,
> --Eljay
> 
> 

-- 
View this message in context: http://old.nabble.com/Error-after-installing-new-version-of-gcc-tp27879757p27880345.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Error after installing new version of gcc
  2010-03-12 17:38   ` Jangid
@ 2010-03-12 19:12     ` John (Eljay) Love-Jensen
  0 siblings, 0 replies; 4+ messages in thread
From: John (Eljay) Love-Jensen @ 2010-03-12 19:12 UTC (permalink / raw)
  To: Jangid, gcc-help

Hi Manoj,

If your non-compliant C++ code worked on a C++ compiler that happened to be lax (i.e., allowed non-compliance), as I see it your two choices are:
+ continue to use the lax C++ compiler
+ make your non-compliant C++ code C++ compliant

My expectation is that the non-compliant C++ code which is brought into compliance should still work on the older compiler without issue.

Sincerely,
--Eljay

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-12 17:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12 16:57 Error after installing new version of gcc Jangid
2010-03-12 17:28 ` John (Eljay) Love-Jensen
2010-03-12 17:38   ` Jangid
2010-03-12 19:12     ` John (Eljay) Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).