关于编译

LittleSpider2019 2010-11-22 12:14:42
怎么用borland c++ builder编译,生成.exe,已经生成了.OBJ
...全文
55 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhuruibing 2010-11-22
  • 打赏
  • 举报
回复
obj链接生成exe
我不懂电脑 2010-11-22
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 littlespider2019 的回复:]
引用 1 楼 zhuruibing 的回复:
obj链接生成exe

连接器在哪里?对builder完全找不到北
[/Quote]

链接器是用命令行调用的,你看下帮助就知道了
The linker syntax controls how the linkers work. Linker command-line options are case-sensitive.
The linkers can also use a configuration file called ILINK32.CFG for options that you'd normally type at the command-line.

Syntax

ILINK32 [@respfile][options] startup myobjs, [exe], [mapfile], [libraries], [deffile], [resfile]

[@respfile] A response file is an ASCII file that lists linker options and file names that you would normally type at the command line. By placing options and files names in a response file, you can save the amount of keystrokes you need to type to link your application.

[options] Linker options that control how the linker works. For example, options specify whether to produce an .EXE or a DLL file. Linker options must be preceded by either a slash (/) or a hyphen (-).
startup A Borland initialization module for executables or DLLs that arranges the order of the various segments of the program. Failure to link in the correct initialization module usually results in a long list of error messages telling you that certain identifiers are unresolved, or that no stack has been created.

myobjs The .OBJ files you want linked. Specify the path if the files aren't in the current directory. (The linker appends an .OBJ extensions if no extension is present.)
[exe] The name you want given to the executable file ( .EXE, or .DLL). If you don't specify an executable file name, ILINK32 derives the name of the executable by appending .EXE or .DLL to the first object file name listed. (The linker assumes or appends an .EXE extensions for executable files if no extension is present. It also assumes or appends a .DLL extension for dynamic link libraries if no extension is present.)

[mapfile] Is the name you want given to the map file. If you don't specify a name, the map file name is given the same as exefile (but with the .MAP extension). (The linker appends a .MAP extensions if no extension is present.)
[libraries] The library files you want included at link time. Do not use commas to separate the libraries listed. If a file is not in the current directory or the search path (see the /L option) then you must include the path in the link statement. (The linker appends a .LIB extension if no extension is present.)

The order in which you list the libraries is very important; be sure to use the order defined in this list:
Code Guard libraries (if needed)
List any of your own user libraries, noting that if a function is defined more than once, the linker uses the first definition encountered
IMPORT32.LIB (if you抮e creating an executable that uses the Windows API)
Math libraries
Runtime libraries
[deffile] The module definition file for a Windows executable. If you don't specify a module definition (.DEF) file and you have used the /Twe or /Twd option, the linker creates an application based on default settings. (The linker appends a .DEF extension if no extension is present.)

[resfile] A list of .RES files (compiled resource files) to bind to the executable. (The linker appends an .RES extension if no extension is present.)
LittleSpider2019 2010-11-22
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zhuruibing 的回复:]
obj链接生成exe
[/Quote]
连接器在哪里?对builder完全找不到北
lghndyz 2010-11-22
  • 打赏
  • 举报
回复
c++builder通过compiling生成obj,让后通过linking生成exe!!至于是怎么实现,可以看看编译原理!!

13,826

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧