|
This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?[:]
From the previous installation, download the latest Furusettoappufairu.
If the current 2010.05, MinGW-5.1.6.exe be.
Mingw shared library needed for the iconv character set conversion download and keep.
If the current 2010.05, following a set of files.
From the above three files are required at least.
If 整Etai and development environment, all you need.
Then, GCC3 case series, download the following files.
GCC3 system is built 20060117-1 minutes to download.
20060117-2, and 20060117-3, there is a newer build, this is to prevent the conversion of character code.
Here, 20060117-1 Please note that to use in building.
The downloaded file and all, MinGW will unzip to overwrite the installation.
From the above two files are required at least.
If the environment is 整Etai other languages, all you need.
Then, GCC4 case series, download the following files.
The downloaded file, the following order, all, MinGW will unzip to overwrite the installation.
Then, MinGW Set up environment variables for compilation.
The downloaded file, the following order, all, MinGW will unzip to overwrite the installation.
After setting this up once, C + + let's compile.
For example, the following code (sample.cpp) Prepare.
|
|
The above sample code c: \ mingw \ bin directory and that you type the following commands can be compiled.
Executable at this time, "sample.exe" will be.
|
Executable file that was created "sample.exe" Let's run.
|
Here, Qt Creator binaries are OK.
The latest version (currently 2010.5, 1.3.1) Download and install it.
Most just follow the onscreen instructions to install.
Should be noted, MinGW is not installed.
Use MinGW installed first.
Are included MinGW is, GCC3 system / GCC4 regardless systems, encoding the source code, the literal string and UTF8 unless the section will be a problem here, please note that the installation .
Therefore, the first four-screen installation "MinGW" 外Shimashou check.
Then, Qt Creator Start, Qt Library Sets.
The Tools menu (T)]
- Options (O)]
Selected.
Here, from the left tree, Qt4 - Qt Version menu.
Appears to auto-detect the right, in that time you want the Qt library (SDK) if you have the path, select it.
If not found, select the document, click the + button on the right.
From child items are displayed, select it, bottom right
Finally, the default version of Qt bottom right, select the name set in the previous version, click the Apply button.
Then specify the debugger.
From the left tree, debug - Gdb selected.
Gdb on the right path, Gdb the full path to the executable file.
(For example:
C: \ MinGW \ bin \ gdb.exe)
If, gdb.exe, and if that does not exist anywhere, download from here, gdb.exe I just unzip the appropriate directory.
Extracting the destination specified here.
Download:
http://ftp.gnu.org/gnu/gdb/
Today 2010.05, gdb-7.1.tar.gz seems to be the latest, download it, unzip use.
MinGW is basically, regardless of character. Conversely speaking, the default behavior, all character codes ASCII (Laten) that are also recognized. If you do not specify anything in particular, character codes within the program will be treated in the source code of the character. This point, VC + + are similar. If you use the Japanese version, SJIS, UNICODE (UTF-16) can be used. Character in the source code is handled internally literal, ShiftJIS Determine what will be a UNICODE.
|
For example, the above code and saved ShiftJIS UNICODE (UTF-8 BOM in), but try to save the cl command to compile.
|
Accept it, DOS prompt, run from.
|
Fine, 06-byte data are seen as 8-byte data. If the UNICODE, the output string UNICODE (UTF-8) is garbled to.
Continues, MinGW Try the same way.
|
As mentioned above, MinGW does, rather than in the GCC, UNICODE BOM is not to have a properly compiled. Here, UTF-8 BOM files without "sample_utf8n.cpp" Let's create a compilation like.
|
Now the time being, VC could be the same. Let each run.
|
For GCC, the character encoding of input and executable can be specified for each. In, UTF-8 ShiftJIS let the source code to convert the executable file.
|
Like this, UNICODE (UTF-8) far from the source code for Windows could create an application ShiftJIS.
Well, ShiftJIS source code is written in, you can leave it and say, different.
Similarly, the source code may not compile correctly ShiftJIS I need to be specified.
Let ShiftJIS following source code to compile.
|
Would be an error like this.
This, GCC character codes are strictly ASCII (laten) is proof that you recognize.
|
To compile this source code correctly, you'll work - as specified below.
|
Now, ShiftJIS I could compile the source code written in.
Based on this far, Qt Creator + MinGW try to embed source code in Japanese.
In VC + +, I could write anything without knowing Japanese.
However, MinGW, if you write Japanese, you'll need to specify a character encoding where the source code to compile options.
In the above, g + + was written directly to the parameters.
Qt Creator allows you to write the project file.
|
Adding to this, ShiftJIS source code written in ShiftJIS you can create a Windows application.
In addition, UTF-8 if the source code, should I as follows.
|
The projects in the following settings, you can specify the character encoding of the editor.
Does not display a dialog window where nothing will be displayed directly Qt Japanese let the title application.
Append a line like this: 09 titles to display.
|
|
The following screen appears when you build and run it.
Leave a Reply