BCC55 ALL IN ONE

   前言

   大家好!我想分享自己使用bcc55borland c++ compiler 55)的经验,

bcc55刚放出来就下载了,受益良多。欢迎大家纠正我的错误,欢迎补充。

   致谢

   首先感谢www.google.com,再感谢众多的程序高手的网页,引用时我会提到。

第一部分

基本工具及配置

参考http://csjava.occ.cccd.edu/~gilberts/bcc55.html

下载

Compiler&patcheshttp://www.borland.com/bcppbuilder/freecompiler/

turbo debuggerhttp://www.borland.com/bcppbuilder/turbodebugger/

help ftp://ftp.borland.com/pub/bcppbuilder/techpubs/bcb5/b5std.zip

faqhttp://community.borland.com/downloads/ti-faq/cpp-faq.zip

安装

freecommandLinetools.exeTurboDebugger.exe安装到一个地方,我用的E:\BCC55\

设置

环境变量(系统变量较方便):把E:\BCC55\Bin加到Path里,新建BCCDIR,值为E:\BCC55

配置文件:在E:\BCC55\Bin\下新建bcc32.cfg,内容为

-IE:\BCC55\Include

-IE:\BCC55\Include\Gl

-LE:\BCC55\Lib

-LE:\BCC55\Lib\PSDK

-DWINVER=0x0400

-D_WIN32_WINNT=0x0400

新建ilink32.cfg,内容为

-LE:\BCC55\Lib;E:\BCC55\Lib\PSDK

附带说一句,以上两个文件是bcc32.execompiler)和ilink32.exelinker)的搜索路径,而brcc32.exeresource compiler)不支持.cfg文件,一旦XX.rc里面有 #include windows.h”就会报错,可以用命令行brcc32 –iINCLUDE_PATH,或者新建环境变量INCLUDE=E:\BCC55\Include.

可以试试helloworld了,

Hello.cpp

 

#include <iostream>

 

using namespace std;

 

int main()

{

    cout << "Hello world!" << endl;

    return 0;

}

放在E:\BCC55\works里,再复制一个cmd.exe进去,打开cmd.exe,写bcc32 hello.cpp

再运行hello.exe

hello

有结果:

Hello world!

第二部分

增加ideeditor

passSciTEwww.scintilla.org/SciTE.html,只支持单个文件。再passXXXEdit等商业软件。余下的有

1.CodeBlocks

2.JFE

3.VIDE.

 

<!--[if !supportLists]-->1.       <!--[endif]-->关于codeblocks

参考:http://www.codeblocks.org/

CodeBlocks(http://www.codeblocks.org/)forum-->nightly build里面下一个nightly build。解压到E:\CodeBlocks。再配置settings--compiler and debugger,选择borland c++ compiler 5.5,5.82,

<!--[if !vml]--><!--[endif]-->

linker settings—link libraries add E:\BCC55\Lib\import32.lib E:\BCC55\Lib\cw32.lib

<!--[if !vml]--><!--[endif]-->

search directories---compiler add E:\BCC55\Bin E:\BCC55\Include

<!--[if !vml]--><!--[endif]-->linker add E:\BCC55\Lib E:\BCC55\Lib\PSDK

<!--[if !vml]--><!--[endif]-->resource compiler add E:\BCC55\Bin

<!--[if !vml]--><!--[endif]-->toolchain executable 如下配置

E:\BCC55

bcc32.exe

bcc32.exe

ilink32.exe

tlib.exe

td32.exe

brcc32.exe

make.exe

<!--[if !vml]--><!--[endif]-->bcc32.exe,ilink32.exe均在E:\BCC55\Bin下。

现在codeblocks能用了。不过td32其实用不了,codeblocks的论坛里说不支持td32

再说wxwidgetscodeblocks本身就是用它做的GUI

sourceforge下载wxMSW-2.8.4.zip,解压到一个目录,我用的是

E:\BCC55\wxWidgets-2.8.4,新建环境变量wxwin=E:\BCC55\wxWidgets-2.8.4

E:\BCC55\wxWidgets-2.8.4\build\msw里用命令行 make –f makefile.bcc(生成ansi debug版本)在E:\BCC55\wxWidgets-2.8.4\src\msw下的menu.cpp似乎有问题,去下一个wxMSW-2.6.4.zip,用其中的menu.cpp替换即可,make完成后,在E:\BCC55\wxWidgets-2.8.4\lib\bcc_lib有新生成的.lib

Codeblocks支持wxwidgets的工程向导,GUI设计工具wxSmith,做一个最简单的frame试试

先设置settings---global variables wx =E:\BCC55\wxWidgets-2.8.4

<!--[if !vml]--><!--[endif]-->

Create a new project 取名wxdemo

按向导来

<!--[if !vml]--><!--[endif]--><!--[if !vml]--><!--[endif]--><!--[if !vml]--><!--[endif]--><!--[if !vml]--><!--[endif]-->

$(#wx)就是刚才设的global variables

<!--[if !vml]--><!--[endif]-->

不选release因为我现在做的是debug 版的wxwidgets

Buildrun。

<!--[if !vml]--><!--[endif]-->codeblocks+bcc55的工程向导对consolewin32wxwidgets都有效,openglsdl等好象不行。

2007-8-26

明天写JFE(Jens' File Editor -The Ultimate Editor for programmers )+BCC55