简体   繁体   English

如何在Free Pascal IDE中创建项目文件?

[英]How to create project file in Free Pascal IDE?

I'm started to learn Free Pascal and stick to the simple yet important question: is it possible to create project in console Free Pascal IDE? 我开始学习Free Pascal并坚持这个简单而重要的问题:是否可以在控制台Free Pascal IDE中创建项目?

How could I compile two units into one program? 我如何将两个单元编译成一个程序?

I've searched over Internet, but all links leads to the Lazarus , which is not the same thing as Free Pascal IDE ... 我通过互联网搜索,但所有链接都导致Lazarus ,这与Free Pascal IDE ...

My best clue would be is to use Makefiles, but as far as I can see, information on this is also very-very limited. 我最好的线索是使用Makefiles,但据我所知,有关这方面的信息也非常有限。

So how create and compile multi-unit Pascal programs in Free Pascal IDE then? 那么如何在Free Pascal IDE中创建和编译多单元Pascal程序呢?

The textmode IDE has no project concept where a list of files is kept, OR any external build system. textmode IDE没有保存文件列表的项目概念,也没有任何外部构建系统。

Basically the autobuild capability of the compiler (that is built-in) is utilized, so pressing compile or build on the mainmodule(program) will compile the whole lot. 基本上使用编译器(内置)的autobuild功能,因此在mainmodule(程序)上按下编译或构建将编译整个批次。

The main module can be set in compiler->primary file, so that compile will also work from non main modules. 主模块可以在compiler-> primary文件中设置,因此编译也可以在非主模块中使用。

However it is possible to have local IDE settings (primary file, directories, defines), by copying all fp.(cfg|dsk|ini) files from the FPC directory to your project dir, and then customizing them (from within the IDE). 但是,可以通过将所有fp。(cfg | dsk | ini)文件从FPC目录复制到项目目录,然后自定义它们(从IDE中)来进行本地IDE设置(主文件,目录,定义) 。

One could regard the combination of a set of config files + a directory for the mainmodule as a project or solution. 可以将一组配置文件的组合+主模块的目录视为项目或解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM