Libmemcached encountered an error during compilation:
./config.h:632:15: error: two or more data types in declaration specifiers
#define off_t long int
^
./config.h:632:20: error: two or more data types in declaration specifiers
#define off_t long int
^
./config.h:658:17: error: two or more data types in declaration specifiers
#define ssize_t int
Since config. H
is generated through the automake
tool, I don’t know where to find the problem for a while
first write a try. C
file:
#define off_t long int
#define ssize_it int
int main() {
return 1;
}
Can be compiled
multiple attempts have found that it is related to the order of #define. If #define off_ T long int in #define < stdxx.h> Before, an error will be reported, otherwise no error will be reported
via G + + - E - P try. C > XX
, you can see:
#define long int __off_t
#define __off_t off_t
If#define off_t long int
is ahead of stdxx.h
,then use long int
to replace off_t
:
#define long int __off_t
#define __off_t long int
A loop occurs, so an error will be reported
and if #define off_ T long int
after stdxx. H
because you already have #typedef__ off_ t off_ T
without execution
In addition, it is found that #include “A.H” can also be used as #include & lt; a.h>, Previously, it was thought that local. H files could only be imported with “” instead of & lt& gt;, Now it is found that with GCC - I.
, the directory with – I and include can be used with & lt& gt; Import local H files.
In addition, G + + can get preprocessed output in – E – P X.C, that is, a. CC file. The extern "C" {...}
requires that the precompiled output must be compiled by G + +.
Read More:
- C++ new types may not be defined in a return type Error?
- [Solved] error C4996: QString::SkipEmptyParts declaration has been rejected
- [Solved] igb Compile Error: igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’
- Two Way Communication Error: Function two_way_comm_post_message / two_way_comm_post_message_ex faile
- The tree component in easyUI does not display data or displays undefined solutions
- Cmake Setting Support C++11 This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options
- [Solved] Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), v
- [Solved] TS Error: Could not find a declaration file for module
- Error 2 error c2491: XX: definition of dllimport static data member is not allowed
- How to Solve Fatal error stdatomic in C/C++ Compilation
- Go Language Error: main redeclared in this block [How to Solve]
- R language learning problem solving error in output $nodeid: $operator is invalid for atomic vectors
- [Solved] VScode Run C++ File Error: fatal error:opencv2\core.hpp:No such file or diretory
- Error: # error PCL requires C++ 14 or above
- C# Error: Import “google/protobuf/timestamp.proto“ was not found or had errors. [How to Solve]
- [Solved] R Language Error: Error in file(out, “wt“) : cannot open the connection
- Angular6 rxjs start error in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ‘;’ expected.
- [Solved] Laravel Create Data Table Error: Syntax error or access violation: 1071 Specified key was too long
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- C++: fatal error: variant: No such file or directory