2.屠龙刀UEStudio '05
UEStudio '05是我们经常使用的UltraEdit-32的加强版,是一个很不错的IDE,用她配合各种编译器,可谓天衣无缝。
下面我们就开始创建第一个项目。
首先选择Project 菜单并选择Project Manager,如图所示。

下一步,点击Project Manager对话框中右侧的Create 按钮并选择上下文菜单中的Using Templates。
在New Project对话框中,从 [1]处的Compilers 面板中选择Borland C++编译器。然后从[2]处的Templates面板中选择希望创建应用程序的类型。在[3] 处的Project Name文本框中输入项目名称并在 [4] 处的 Location 中选择其保存路径。最后点击[5]处的Create按钮。

此时,UEStudio '05为我们创建了一个非常简单的项目。

下面我们尝试编译此项目,点击Build toolbar上的Build按钮。

UEStudio '05将弹出Compiler Options 对话框,在此对话框中,可以更改编译器的选项设置,我们使用默认值。点击OK 按钮。

但是令我们意外的是输出窗口输出的却是如下错误信息:

这是怎么回事呢?
经过我的分析,得出的结论是UEStudio '05当前的BCC编译器设置是针对旧版本的BCC而不是新版本的BCC32,从而不能正常进行编译。
看来还需要DIY一番才行。
从Build菜单中选择Select Compiler,在出现的Select Compiler对话框中,确保Compilers面板中被选中的是Borland C++ Compiler项中的Application,点击Edit Configuration按钮,下面的工作就是在右侧窗口中更改一些设置项。

(1)在项[Variables]目下找到:
CPATH=C:\BORLANDC
将其更改为:
CPATH=C:\BCC55
再把:
COPT = -c $(Generate Code) $(Memory Model) $(Warning Level) $(Calling Convention) $(Alignment) $(Floating Point) $(Force C++ Compile) -$(Compilance) -I$(CPATH)\INCLUDE -I$Ip
更改为:
COPT = -c $(Generate Code) $(Warning Level) $(Calling Convention) $(Alignment) $(Floating Point) $(Force C++ Compile) -$(Compilance) -I$(CPATH)\INCLUDE -I$Ip
即删除“$(Memory Model)”。
(2)在[Build]项目下找到:
DebugFlag = -ll -ls -lv
将其更改为:
DebugFlag = -lap -ls -lv
再把:
Cmd0 = BCC -l3 -L$(CPATH)\LIB $R -e$T $FGO $FGL
更改为:
Cmd0 = BCC32 -L$(CPATH)\LIB $R -e$T $FGO $FGL
(3)在[.C]项目下找到:
Cmd0 = BCC $(COPT) $R -o$O $I
更改为:
Cmd0 = BCC32 $(COPT) $R -o$O $I
最后点击Save Configuration按钮。至此我们就做完了基本的修改,现在再次尝试编译,即可顺利通过。
以上所做的更改只是能保证通过编译,UEStudio '05中的BCC编译器设置已经陈旧,您可以借助两者的帮助文件对这些设置做适当的修改。
以下列出我所做出修改,仅供参考!
# ------------ Borland C++ configuration -----------

#------------- Modified by D0n9Xf ------------------

#------------- 2006/05/18 --------------------------

# --- general --------------------------------------

# $P - project name

# $Pp - path to project directory

# $Pn - project name

# --- compile --------------------------------------

# $I - input full name

# $Ip - input path

# $In - input name

# $Ie - input extension

# $O - output file

# $Op - path to output file

# $On - output filename (without path)

# $Oe - output extension

# $R - release/debug setting for compiler

# --- build ----------------------------------------

# $T - target full name

# $Tp - target path

# $Tn - target name

# $O - output file

# $Op - path to output file

# $On - output filename (without path)

# $Oe - output extension

# $R - release/debug setting for linker


[Settings]


Target =

Category&01 = DEFAULT RUN CONFIGURATION

Working Directory =.

Command Line Arguments =

Category&02 = COMPILER OPTIONS

Generate Code = 80386|i486|Pentium|Pentium Pro

Compilance = AT|A|AK|AU

Warning Level = default|all warnings

Floating Point = Emulation|None|Fast floating point|Correct Pentium FDIV flaw

Calling Convention = C|Pascal|Register|Standard Call|MSVC __fastcall

Force C++ Compile = disable|enable

Alignment = Byte|Word|Double word|Quad word|Paragraph

Optimize For = Size|Speed

Template = Smart|External

Libraries =

Excluded Files = Excludes

Compiler Options =

Debugger=

External Dependencies=yes|no


[SettingsInfo]

Target = 在此处指定链接器生成的程序的输出文件和存储位置。

Working Directory = 在此指定可执行文件运行的目录。如果不特别指定此目录,可执行程序将在其所在目录中运行。

Command Line Arguments = 你可以在此处为程序指定启动时要传递的命令行参数。

Libraries = 在此处指定要传递给链接器的目标文件或标准库(静态库或者输入库)。并以空格分隔各个文件名。

Warning Level = 显示警告选项:指定编译器显示哪些警告信息。

Excluded Files = 包含在这个UE项目组内的文件将不被编译。

Compilance = AT-使用Borland C++关键字和扩展的关键字, A-ANSI关键字, AK-使用K&R关键字, AU-使用UNIX V 关键字和扩展的关键字。

Compiler Options = 指定额外的编译器选项:在此处填入您特别指定的选项。

Linker Options = 你可以在此处为链接器指定额外的选项。

Generate Code = 指令集选项:指定编译器使用何种指令集生成程序代码。3-80386,4-80386/80486,5-Pentium,6-Pentium Pro

Alignment = 数据对齐方式选项:指定编译器如何在内存中对齐数据。a1-Byte,a2-Word,a4-Double word,a8-Quad word,a16-Paragraph

Floating Point = 浮点数选项:指定编译器如何处理浮点数编码和优化。

Calling Convention = 调用约定选项:指定编译器生成函数调用的调用序列。

Template = 模板选项:指定编译器如何在C++中生成模板实例。

Debugger = 可以在此处设定一个调试器用于调试你的应用程序。

External Dependencies = 如果选择 "yes" 选项,uemakeXp 将从被包含的文件生成 "External Dependencies" 项目组。


[SettingsReps]


Generate Code = 80386=-3|i486=-4|Pentium=-5|Pentium Pro=-6

Warning Level = default=|all warnings=-w

Calling Convention = C=-pc|Pascal=-p|Register=-pr|Standard Call=-ps|MSVC __fastcall=-pm

Floating Point = Emulation=-f|None=-f-|Fast floating point=-ff|Correct Pentium FDIV flaw=-fp

Alignment = Byte=-a1|Word=-a2|Double word=-a4|Quad word=-a8|Paragraph=-a16

Optimize = Size=-O1|Speed=-O2

Template = Smart=-Jgd|External=-Jgx

Force C++ Compile = disable=-P-|enable=-P

External Dependencies=yes=1|no=0


[Variables]


CPATH=C:BCC55

COPT = -c $(Generate Code) $(Warning Level) $(Calling Convention) $(Alignment) $(Floating Point) $(Force C++ Compile) $(Template) -$(Compilance) -I$(CPATH)INCLUDE -I$Ip


[Environment]


PATH = $(CPATH)BIN;%PATH%

INCLUDE = $(CPATH)INCLUDE


[General]


TargetExt = .EXE

ReleaseOut = Release

DebugOut = Debug

UseFullPaths = 0

UseDosNames = 0

Excludes = $(Excluded Files)

#EasyCapture = 1


MakeTool = C:BCC55Binmake.exe


.ASM = .C

.CPP = .C

GenerateEDGroup=$(External Dependencies)


[MakeCommands]


run = Execute Application

debug=Start Debugger

makef=Show Makefile


[Execute Application]


Title = Execute $T

Cmd0 = $(Command Line Arguments)

Depends = $T

ShowWindow = 1

DisplayConsole = 1


[Start Debugger]

Title=Debug $T

Cmd0=$(Debugger) $T

Depends=$T

ShowWindow=1


[Show Makefile]

Title=Show makefile

Cmd0=uestudio makefile

ShowWindow=1

DisplayConsole=0


[InsertFiles]


group0 = $(Libraries)


[FileGroups]


FGO = .obj;

FGL = .lib;


[Build]


Out = $T

Depends = $FGO

DebugFlag = -lap -ls -lv

Cmd0 = BCC32 -L$(CPATH)LIB $R -e$T $FGO $FGL


[.C]

Out = $In.obj

ReleaseFlag = -O -Z $(Optimize)

DebugFlag = -y -v

Cmd0 = BCC32 $(COPT) $R -o$O $I

IncFiles = 1

CaseSensitive = 1

IncDirs = .;$(INCLUDE);

IncKeyWords = #include;


Comments = /**//*.*/.//.eol.


阅读(3829) | 评论(0) | 转发(0) |