C++ compiler problems with FC2

Steve Friedman steve at adsi-m4.com
Tue Aug 31 20:09:21 UTC 2004


On Tue, 31 Aug 2004, Paul wrote:

>
>>                   from /home/steve/opengc55-fgfs094/opengc/Source/Base/main.cpp:45:
>> /usr/include/c++/3.3.3/cstring:79: error: `memcpy' not declared
>> /usr/include/c++/3.3.3/cstring:80: error: `memmove' not declared
>
> #include <cstdlib>
>
>> /usr/include/c++/3.3.3/cstring:81: error: `strcpy' not declared
>> /usr/include/c++/3.3.3/cstring:82: error: `strncpy' not declared
>> /usr/include/c++/3.3.3/cstring:83: error: `strcat' not declared
>> /usr/include/c++/3.3.3/cstring:84: error: `strncat' not declared
>
> #include <cstring>
>
> Should fix that lot.
>

>>                   from /home/steve/opengc55-fgfs094/opengc/Source/Base/main.cpp:45:
>> /usr/include/c++/3.3.3/cmath: At global scope:
>
> using namespace std; will help

I must be a bit thick today.  I don't understand why:

- it compiled cleanly under g++ 3.3.1 on FC1, but not 3.3.3 on FC2

- cstring depends on cstdlib being included first and doesn't include it 
itself

- how including cstring will resolve problems with cstring.

- how setting the namespace after the includes will have any effect on 
errors that arise from including header files.

- how this code failed when your test code worked.  I just rearranged 
main.cpp so the first lines read:


#include <cstdlib>
#include <cstring>
#include <iostream>

... rest of the program as before


and the same errors result.  I guess that it is time to dig into the g++ 
options this code is using.

Steve Friedman





More information about the fedora-test-list mailing list