C++, error: '__locale_t' has not been declared

Zhenxiao Hao

I'm new to C++, I got error: '__locale_t' has not been declared when I included some header files, like #include "ruby.h" , #include <string.h> and so on, but there's no problem for #include <stdio.h>, I'm using eclipse under Linux, the detailed error for #include "ruby.h" and #include <string.h> is:

/usr/include/string.h:548: error: '__locale_t' has not been declared
/usr/include/string.h:549: error: nonnull argument references non-pointer operand (argument 1, operand 3)
/usr/include/string.h:552: error: '__locale_t' has not been declared
/usr/include/string.h:553: error: nonnull argument references non-pointer operand (argument 1, operand 4)

The order of the include is:

#include "Abc.h"

#include <string.h>
#include "ruby.h"
#include <stdio.h>

Where Abc is the class name.

This is the Abc class, nothing added except the include:

#include "Abc.h"
#include <stdio.h>
#include <string.h>
#include "ruby.h"

#include "ose_gw.h"

namespace a {

Abc::Abc() {
    // TODO Auto-generated constructor stub
}

Abc::~Abc() {
    // TODO Auto-generated destructor stub
}

} /* namespace a */
Andre Holzner

Try compiling with:

g++ -D__USE_XOPEN2K8 ...

(see also https://sourceware.org/bugzilla/show_bug.cgi?id=10456 which mentions that xlocale.h is only included from string.h when __USE_XOPEN2K8 is defined)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

boost:asio ::UnregisterWaitEx has not been declared

From Dev

Member "has already been declared" error with CUDA and Eigen

From Dev

silly C++ syntax has not been declared

From Dev

::write() and ::read() has not been declared error. Qt5 UNIX signal handling

From Dev

When the destroy() has been declared?

From Dev

error: 'ios_base' has not been declared

From Dev

"Error: '::hypot' has not been declared" in cmath while trying to embed Python

From Dev

C++ make error: object_var has not been declared

From Dev

Undeclared variable in C while it has been declared

From Dev

Browser: Identifier X has already been declared

From Dev

Creating a form that has not been declared works - I don't know why

From Dev

g++10, C++20, boost 1.75.0 :: error: 'awaitable' has not been declared in 'boost::asio'

From Dev

GCC does not throw an error during the compiler stage when a function has not been forward declared

From Dev

Assigning a variable to a textBox once it has been declared

From Dev

Bool has not been declared

From Dev

Action has no declared type error

From Dev

When the destroy() has been declared?

From Dev

Namespace has not been declared

From Dev

build insert statement error Https has already been declared

From Dev

Debian Jessie 8.9 Compiling Error for Cryptocoin Wallets "error: ‘::SSLv3_server_method’ has not been declared"

From Dev

C++ Compile error on NetBSD '::system' has not been declared

From Dev

ERROR: 'Namespace for prefix 'xsi' has not been declared.'

From Dev

Variable X has been used before it's been declared

From Dev

How to import a C function into C++ project that has not been declared in a C header?

From Dev

The field was declared on serializer , but has not been included error in django rest

From Dev

c++ a heap has been corrupted error when running the program

From Dev

C++ '<class name> has not been declared' and '<class name> has no field <field name>' errors

From Dev

rapidjson + c++: "abort() has been called" error

From Dev

"The global element ... has already been declared" errors

Related Related

  1. 1

    boost:asio ::UnregisterWaitEx has not been declared

  2. 2

    Member "has already been declared" error with CUDA and Eigen

  3. 3

    silly C++ syntax has not been declared

  4. 4

    ::write() and ::read() has not been declared error. Qt5 UNIX signal handling

  5. 5

    When the destroy() has been declared?

  6. 6

    error: 'ios_base' has not been declared

  7. 7

    "Error: '::hypot' has not been declared" in cmath while trying to embed Python

  8. 8

    C++ make error: object_var has not been declared

  9. 9

    Undeclared variable in C while it has been declared

  10. 10

    Browser: Identifier X has already been declared

  11. 11

    Creating a form that has not been declared works - I don't know why

  12. 12

    g++10, C++20, boost 1.75.0 :: error: 'awaitable' has not been declared in 'boost::asio'

  13. 13

    GCC does not throw an error during the compiler stage when a function has not been forward declared

  14. 14

    Assigning a variable to a textBox once it has been declared

  15. 15

    Bool has not been declared

  16. 16

    Action has no declared type error

  17. 17

    When the destroy() has been declared?

  18. 18

    Namespace has not been declared

  19. 19

    build insert statement error Https has already been declared

  20. 20

    Debian Jessie 8.9 Compiling Error for Cryptocoin Wallets "error: ‘::SSLv3_server_method’ has not been declared"

  21. 21

    C++ Compile error on NetBSD '::system' has not been declared

  22. 22

    ERROR: 'Namespace for prefix 'xsi' has not been declared.'

  23. 23

    Variable X has been used before it's been declared

  24. 24

    How to import a C function into C++ project that has not been declared in a C header?

  25. 25

    The field was declared on serializer , but has not been included error in django rest

  26. 26

    c++ a heap has been corrupted error when running the program

  27. 27

    C++ '<class name> has not been declared' and '<class name> has no field <field name>' errors

  28. 28

    rapidjson + c++: "abort() has been called" error

  29. 29

    "The global element ... has already been declared" errors

HotTag

Archive