Re: C++ errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Archana Naik wrote:


Archana Naik <arc123_2000@xxxxxxxxx> wrote:

Hi, All

I am new to linux and trying to compile my
program. I get these basic C++ errors.


**************************************************
/usr/include/c++/3.2.3/cstring:79: `memcpy' not
declared
<snip long list of similar>


Any ideas??

The first thing that comes to mind is that you're
doing something funny when trying to compile it.
Can you show how you're trying to compile and
preferably a short program that demonstrates the
problem?


>
> Thanks for your response. I am using my company's sdk
> to build my program. My program has several .cpp and
> .h files. Bcoz of this problem i am trying one file at
> a time. Here is my g++ statement that I am suing to
> compile my file:
>
>  g++  -I/usr/include
> -I../../../../develop/global/src/dwf
> -I../../../../develop/global/src/dwfcore
> -DDWFTK_BUILD_EXPAT
> -c DwfFilereader.cpp
>
> So basically I am specifying all my include dirs, some
> compile falgs and -c to compile my source file.
>

I'm suprised to see -I/usr/include on that list,
but it shouldn't do any harm.

> I have installed fedora just few days ago and it has
> G++ 4.0. I have compiled these same source files using
> redhat 3.x versions of G++ and they used to compile
> just fine.
>

I'll start by saying I haven't used FC4/gcc 4 so this
might be a red herring, but I notice your errors are
referring to /usr/include/c++/3.2.3/cstring.  That looks
to me like it should contain the includes for gcc 3.2.3.
So I'd think either your source (or the sdk headers you're
using) are pointing explicitly to this directory when they
should just do #include <cstring> and the rest for the
standard C++ headers, or that your gcc install is somehow
messed up.  Either way, using the wrong standard headers
is a likely source of trouble.

Beyond that I'm out of ideas.  You could try a small
program that links the standard headers, <cstring> for
example, and see if it compiles, which would at least
eliminate the gcc install as the problem.  Your
problem is happening well before linking (and you're
compiling without linking anyway), so I doubt -lstdc++
will work (running as g++ should take care of that
anyway).

--
imalone


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux