When building a solidmcp, I had the idea of X platform in the dark, and finally decided to start work tonight.
Download the codeblock and try to compile it with GCC. I found many errors. Modify it and take a note:
> Stray '\ 255' in program and null character (s) Warning
Bytes ------------------------------------------------------------------------------------
S:/Server/bedrock/config/details/asciitable. h: 1: Error: stray '\ 255' in program
S:/Server/bedrock/config/details/asciitable. h: 1: Error: stray '\ 254' in program
Bytes ------------------------------------------------------------------------------------
Or
Bytes ------------------------------------------------------------------------------------
S:/Server/bedrock/config/details/asciitable. h: 1: Error: stray '\ 377' in program
S:/Server/bedrock/config/details/asciitable. h: 1: Error: stray '\ 376' in program
Bytes ------------------------------------------------------------------------------------
Cause:
Asciitable. H is encoded as Unicode, and FF Fe is the so-called BOM of Unicode. However, the latter is gossip. Why is it sometimes gossip.
Solution:
Open it with notepad, Change Encoding to ANSI in the Save As dialog, re-compile, and solve the error.
For more information about Bom, see wiki.
> Invalid initialization of non-const reference
Bytes -----------------------------------------------------------------------------------
Base & pderived = derived_2 ();
S: \ Server \ bedrock \ Itry \ try_std_casts.cpp | 160 | error: Invalid initialization of non-const reference of Type 'base & 'from a temporary of Type 'derived _ 2' |
----------------------------------------------------------------------------------
Cause:
1. We must use an initializer for any const or reference member or for any member of a class type that does not have a default constructor.
2. A nonconst reference may be attached only to an object of the same type as the reference itself.
A const reference may be bound to an object of a different but related type or to an rvalue.
Solution:
Const base & derived = derived_2 ();
> Warning: No newline at end of file? Open link in new tab
Cause: There is no carriage return in the last line of source code. Solution: Press enter in the last line to re-compile. Check whether a script can solve this problem.> Requires compiler and library support for the upcoming Iso c ++ standard program c: \ Program Files \ codeblocks \ mingw \ bin \.. \ Lib \ GCC \ mingw32 \ 4.4.1 \ include \ c ++ 0x_warning.h | 31 | error: # error this file requires compiler and library support for the upcoming Iso c ++ standard, C ++ 0x. this support is currently experim Ental, and must be enabled with the-STD = C ++ 0x or-STD = GNU ++ 0x compiler options. cause of failure: the header file C ++ 0x is referenced in the project, which can be traced all the way. The error here is due to tuple support.> Warning: NULL character (s) ignoreds:/Server/bedrock/config/details/asciitable. h: 1: 4: Warning: NULL character (s) ignored