dimanche 26 juin 2022

Error: expected constructor, destructor, or type conversion before '(' token C++

today i was trying a library for C++ but when i runned the file he gave me an error saying that i had to use -std=c++11 compiler option for start. so i did it. but after that he gaves another error in a file called hashtable_policy.h i can't paste the entire code because its long 2000 lines but i paste che position where it say there is the error

namespace std {}_GLIBCXX_VISIBILITY (default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  template<typename _Key, typename _Value, typename _Alloc,
       typename _ExtractKey, typename _Equal,
       typename _H1, typename _H2, typename _Hash,
       typename _RehashPolicy, typename _Traits>
    class _Hashtable;

_GLIBCXX_END_NAMESPACE_VERSION
...

and that's the error

Compiling single file...
--------
- Filename: %CppIncludeDir2%\c++\bits\hashtable_policy.h
- Compiler Name: TDM-GCC 4.9.2 64-bit Release

Processing header file...
--------
- C Compiler: %BinDir0%\g++.exe
- Command: g++.exe "%CppIncludeDir2%\c++\bits\hashtable_policy.h" -std=c++11 -I"%CppIncludeDir0%" -I"%CppIncludeDir1%" -I"%CppIncludeDir2%" -L"%LibDir0%" -L"%LibDir1%" -L"%CppIncludeDir2%\PyreNet" -static-libgcc
%CppIncludeDir2%\c++\bits\hashtable_policy.h:34:37: error: expected constructor, destructor, or type conversion before '(' token
 namespace std {}_GLIBCXX_VISIBILITY (default)
                                     ^


Compilation results...
--------
- Errors: 1
- Warnings: 0
- Output Filename: %CppIncludeDir2%\c++\bits\hashtable_policy.h.gch
- Output Size: 1,09009170532227 MiB
- Compilation Time: 0,16s

the error is interested to the line 34 Here you can find the full code https://pastebin.com/bY46ebSq

Aucun commentaire:

Enregistrer un commentaire