Ultimate++ Documentation--(1)-- TheIDE Documentation --Getting started with TheIDE

                Ultimate++ Documentation

               TheIDE Documentation

                Getting started with TheIDE

                by Jan Wilmans

//翻译:K J

 

1. After installation, start the Ultimate++ IDE.


//安装完后,打开Ultimate++ IDE



=========================================================================================================

2. Assembly and Packages


//集合与包


2.1

Select the existing assembly "MyApps" that exists by default, by clicking on it once (an assembly is a set of packages, together they make up a whole program).

//用鼠标点一下,选择已存在的缺省集合"MyApps",("集合"由某几个packages组成,组合这几个package就可组成整个程序。)



 

You can create a new assembly by right-clicking on the assembly list and choosing "new assembly".

//你可以在集合列表上右击鼠标,然后选择"new assembly"来新建一个集合。


If you select an existing assembly before this, the directory settings from the existing assembly will be used.

//如果你之前选择过一个已存在的集合,这个(MyApps)集合会被目录设定自动择选。


If you're just getting started, leave this as it is and continue creating a package.

//如果你是刚才开始运行TheIDE,离开这个(MyApps)然后继续创建一个package.

 

2.2

Press the "new" button and the bottom of the window to create a new Package.

//点击窗口底部的"new"按钮来创建一个新的Package.





enter a package name, for this example we'll type "main",

//输入一个package名字,在要本例子中,我们打入"main"这个名字。


leave the "create in" directory as it is for now and press the "Create" button on the bottom of the window.

//离开这个"create in"(创建在)目录。现在是点窗口底下的"Create"按钮的时候了。


leave Template <empty> for now.


===============================================================================================

3. Configure the package and add files.

//配置package和增加文件。

 

3.1 First, if this is your main package (if you don't know what a main package is, just assume it IS :) select "Main package configuration" from the "Workspace" menu.

//首先,如果这是你的main package(如果你不知道什么是"main package",就假定它就是"main package"), 在"Workspace"菜单中选择"Main Package configuration"。





    Here you should set the compiler directives your program needs.

    //现在,你应该配置你的程序需要用的编译器。


    For the main package, you must at least specified "GUI" or "CONSOLE" to tell the compiler what kind of program your what to create.

    //在"main package"中,你必须选定"GUI"还是"CONSOLE"来告诉编译器: 你创建哪一种程序。


        Note for windows users: If you add "GUI" here, the standard cin / cout / cerr will not be connected to anything.

        //用windows的用户注意:如果你在里增加"GUI",标准的 cin / cout / cerr 将不会与任何东西有关联。


        (so even if you start the program from the commandline you will not see any text-output).

        //因此,如果你在命令行中运行这个程序,你将不会看到任何的文本内容输出。



    Just add "CONSOLE" for now, and leave the "optional name" empty (or enter something meaningful, for your own reference).

    //现在,选择"CONSOLE"。由得"optional name"保留空白(或者输入一些有意义的文字,为了你自已日后参考。)


    Press OK

    //点 "OK"



If you forget this step, you close the Ultimate++ IDE and start it again,

//如果你忘记了这个步骤,你先关闭Ultimate++ IDE,然后再开始运行。


you will not see your new package listed under the "MyApps" assembly unless you check to "all packages" box.

//你将看不到你新建的package在"MyApps"集合列表中显示出来,除非你选择了"all packages"选项。


(because only main-packages are listed by default)

//因为在缺省情况下,只有"main-packages"才会列出来。


==========================================================================================

3.2 You can now add files to you package, for this example, add a new file "main.cpp" to the package

//现在你可以增加文件到你的package,在本例子中,增加一个新文件"main.cpp"到package。


rightclick on the lower-left part of the IDE and choose "Insert package directory file(s)", type "main.cpp" and click "open" if the file does not exist, it will be created.

//在IDE的左下方用鼠标右击,选择"Insert package directory files(s)",打入"main.cpp",再点击"open".如果这人文件不存在,它将会被创建。



type or copy this into the newly created file:

 //在新创建成的文件中打入或者拷贝以下内容:


// -- example --     

    #include <iostream>

    

    int main(){

    

        char dummy;

        std::cerr << "Hello, platform! " << std::endl;

        std::cin >> dummy;

    }

// -- example --

 

If you have configured your compiler previously,

//如果你之前已配置了你的编译器。


you can you press F5 to compile and start the program in the debugger. (typing any letter followed by enter will end the program)

//你可以点击F5来编译并用调试器运行你的程序。(你随后打入文字并回车将关闭程序)      

      

-- to be continued ?

//继续?

==================================================================================================

Some explaining about the TheIDE:

//一些有关这个IDE的解释


What is stored where ?

//保存在哪里?

 

When first using the TheIDE, it can be confusing to see that settings like static/shared building, execute-, include- and linker- paths can be set in multiple places (for instance, in Workspace->Package Organizer, in Setup->Build methods and by clicking on the current build method in the mainscreen (top of the screen ie. "GCC Debug").

//当第一时间使用TheIDE,它的设置看起来很混乱,例如 static/shared building, execute-,include-, linker- 的路径能在多个地方被设置(例如:在
// Workspace->Package Organizer,在 Setup->Build methods ,还有点击主屏幕上的当前build method (注:在屏幕的最顶上,例如"GCC Debug") ;


Workspace->Package organizer:

//下面的图就是Workspace->Package organizer:

Everything set here is stored in the .upp file of the package.

//在这里设置的东西都存储在该package的.upp文件中。


You can use you own (or existing) compiler switches to include different things for different builds here.

//在这你能用你自已的(或者已存在的)编译器切换来包含不同的东西来建造不同的builde. 


Examples:

//例如:


When

Additional libraries

Comment

MSCSDL

some extra library to link to with VC++ compiler

MSCSDL_ttf
MINGWmingw32
MINGWSDL.dllmingw compiler has special feature to link directly to .dll files
MINGWSDL_ttf.dll

When

Compiler options

Comment

MSC

/Ot

additional compiler option for VC++.


When

Linker options

Comment
MSC-nologo

some extra linker options when compiler is VC++.


Setup->Build methods:

Look carefully at the settings here, you can create different build methods for different compilers.

//看清楚这里的设置,你能为不同的编译器创建不同的build method(构建方法)


Each method will store it's settings in a .bm file, the .bm (build method) files are stored in ~/.theide on posix systems and in the exe-path of TheIDE on windows.

//每个方法会存储它的设置在一个.bm文件中。这个.bm(build method)文件会在posix系统中存储在~/.theide目录中,在window系统中存储在TheIDE的执行路径中。

     

The boxes at the top of the windows called "Debug mode default" and "Release mode default" do NOT contain the options actually used for the current build.

//在最顶的窗口上的那个部件叫"Debug model defaule"(默认调试模式)和"Release mode default"(默认发行模式)其实并不包含实际上用在当前构建中的设置。


(they are not in effect when your press F5).

//这个在你点F5时并不生效。


These are the default values used for new projects, the options for the current build can be set by clicking on the current build method in the mainscreen (top of the screen ie. "GCC Debug").

//这里有用来新建project的缺省值。点击在主屏幕中的"current build method"(当前构建方法)可以改变"当前构建方法"的没置(注:在屏幕的最顶上,例如"GCC //Debug")。




Notice that it has two "pull-down" arrows, the left one selects the build method, the right one sets the current build-mode (debug of release).
//注意:这里有两个下接箭头,左边是选择构建方法的,右边是设定当前构建模式(调试/发行)的。

Output mode
//输出模式。


Link mode

//连接模式


    All static - static libraries are preferred.

    //全部静态 - 静态库优先选择。


    Shared libs - shared libraries are preferred but the program's packages will be linked static.

    //共享库 - 共享库优先选择,但程序的package将会被静态连接。


    All shared, both the external libraries and the program's packages will be compiled and linked shared.

    //全部共享,外部的库和程序的package将会被编译连接为共享(形式)。


Target override

//指定生成目标文件路径


    You can specify a target-location for the resulting binary here, by default it will be writing to (for example:)

    //你能为生成的二进制(文件)指定一个目标位置,缺省的情况下,它将会生成在以下路径(例如:)


C:/upp/out/$target/MINGW.Blitz.Debug.Shared.So.Win32/foo.exe

 

This file is a work of progress, if you have suggestions for it, please post them on the mailinglist.

 //本文档一项正在前进发展的工作,如果你有关于它的建议,请将它发送到这个邮件列表中。


 

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值