Recently, an open-source text editor scintilla was found to provide fast syntax highlighting and other functions for programming. however, it is troublesome to compile the program by yourself. I found this article on the Internet and spoke well. thank you very much for the original author.
[Sharing] scintilla + bcc55 creating a simple C ++ Development EnvironmentTransferred from www.liduan.com
You can also use DEV-C ++, but GC ++ does not work well in windows. For example, to write a very simple code that only contains one cout,
500 k is compiled with Dev-CPP, and only 111 K is compiled with bc5.5. the Unix timestamp I wrote is converted to Dev-CPP to compile 900 K,
Bcc5.5 compile 200 K (G ++ compiles 14 K in Linux). Therefore, I recommend that Beginners use other compilers in windows.
Borland C ++ compile 5.5 (bcc55) is a good choice for free download.
Borland C ++ compile 5.5 download:
Http://www.codegear.com/Do...
Borland C ++ compile 5.5 SP2 download:
Http://info.borland.com/de...
Download scintilla1.73 (SC:
Http://prdownloads.sourcef .../
The bcc55 installation is very simple. Extract it to a directory and put it under C:/BCC. then configure bcc55 in C: create two ilink32.cfg and bcc32.cfg files under/BCC/bin. You can use notepad or SC. the file content is as follows:
Ilink32.cfg
Program code:
-V-
-X
-L "C:/BCC/LIB; C:/BCC/lib/psdk"
(Modify the path based on your own situation)
Bcc32.cfg program code:
-I "C:/BCC/include"
-L "C:/BCC/LIB; C:/BCC/lib/psdk"
-P
-V-
-W
-Dwinver = 0x0400
-D_win32_winnt = 0x0400
(Modify the path based on your own situation)
After the configuration, install SC. decompress the downloaded ZIP file and copy all the files (not Directories) to C:/BCC/bin. Double-click scite.exe to run SC. Then start SC configuration.
SC configurations are completely linux-style. It writes all the options in a text file. You only need to modify the text file to configure SC.
First, modify the Command Format of C language. The SC command format only supports GCC. You need to modify it to the BCC command format. Open Options and select Open CPP. properties.
Query the code in this file (the second half of the file should be close to the bottom ). Program code:
Ccopts =-pedantic-OS
Cc = g ++ $ (ccopts)-C $ (filenameext)-o $ (filename). o
CCC = GCC $ (ccopts)-C $ (filenameext)-o $ (filename). o
Make. Command = make
Command. Compile. *. c = $ (CCC)-STD = c99
Command. Build. *. c = $ (make. Command)
Command. Go. *. c = $ (filename)
# To make the go command both compile (if needed) and execute, use this setting:
# Command. Go. Needs. *. c = GCC $ (ccopts)-STD = c99 $ (filenameext)-o $ (filename)
Command. Compile. $ (file. patterns. cplusplus) = $ (cc)
Command. Build. $ (file. patterns. cplusplus) = $ (make. Command)
Command. Go. $ (file. patterns. cplusplus) =./$ (filename)
Command. Go. Needs. $ (file. patterns. cplusplus) = g ++ $ (ccopts) $ (filenameext)-o $ (filename)
Command. Build. *. H = $ (make. Command)
Command. name.0. $ (file. patterns. cpp) = indent
Command.0. $ (file. patterns. cpp) = astyle-Tapok-M8 $ (filenameext)
Command. Is. filter.0. $ (file. patterns. cpp) = 1
Command. name.1. $ (file. patterns. cplusplus) = lint
Command.1. $ (file. patterns. cplusplus) = g ++-w-wall-wshadow-wwrite-strings-Wold-style-cast/
-Woverloaded-Virtual-pedantic-OS-fno-exceptions-C $ (filenameext)
Replace all with the following code: program code:
Cc = bcc32-v--w-O1 $ (filenameext)
Command. Compile. *. c = $ (cc)
Command. Build. *. c = make
Command. Go. *. c = $ (filename)
Command. Compile. *. Cc = $ (cc)
Command. Build. *. Cc = make
Command. Go. *. Cc = $ (filename)
Command. Compile. *. cpp = $ (cc)
Command. Build. *. cpp = make
Command. Go. *. cpp = $ (filename)
Command. Compile. *. cxx = $ (cc)
Command. Build. *. cxx = make
Command. Go. *. cxx = $ (filename)
Save and close SC. Now SC can be developed for C ++. However, you cannot directly run scite.exe and need to place it in the system path to run it. The running method is to create a CMD file under C:/BCC.
For example, the content of start. CMD is as follows: program code:
Path = C:/BCC/bin; % PATH %
Doskey/insert
Start C:/BCC/bin/scite. exe
Exit
(Note that the system path C:/BCC/bin is modified according to your own situation)
Save and click Start. CMD to run SC. You can write a CPP file for testing.
For example, the content of test. cpp is as follows: # include <iostream>
Using namespace STD;
Int main ()
{
Cout <"Welcome www.liduan.com" <Endl;
}
After editing, save and select compile in tools for compilation. After you select go to run the program, you can view the program output result on the right.
However, this editor is not user-friendly, for example, I like to number each line. The current row is highlighted. These need to set the global SC
In options, select Open sciteglobal. properties.
Line number, locate: program code:
# Line. Margin. Visible = 1
Line. Margin. width = 4
Margin. width = 16
Changed to: program code:
Line. Margin. Visible = 1
Line. Margin. width = 4 +
Margin. width = 16
Highlighted in the current line: program code:
# Caret. Fore = # ff0000
# Caret. width = 2
# Caret. Line. Back = # fffed8
# Caret. Line. Back. Alpha = 63
Changed to: program code:
Caret. Fore = # ff0000
Caret. width = 2
Caret. Line. Back = # fffed8
Caret. Line. Back. Alpha = 63
Start window size modification: program code:
Position. width = 576
Position. Height = 740
Close and restart. You can also configure an editor for SC + GCC. The configuration methods are basically the same. You do not need to modify the CPP. properties file. The two environments I configured are compared. The above is Bcc, and below is GCC.
Scintilla can also be run in Linux. For configuration methods, refer to my personal blog.