命令行产生汇编代码的问题.

annkie 2003-11-13 11:37:03
cpp1.cpp:

int main(int argc, char* argv[])
{
const int a=10;
int &a1=const_cast<int &>(a);
const int *pa=&a;
a1++;

return 0;
}

bcc32 c:\tmp\cpp1.cpp -S c:\cpp1.asm
为何不能产生汇编代码?
编译的时候有warning也通不过编译?
...全文
67 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
annkie 2003-11-14
  • 打赏
  • 举报
回复
up
梦回童年001 2003-11-14
  • 打赏
  • 举报
回复
都試了,都像都不行啊。
qibo999 2003-11-13
  • 打赏
  • 举报
回复
是不是要装什么TASM32什么的?
annkie 2003-11-13
  • 打赏
  • 举报
回复
to yesry(噎死你):
不行 你编译通过吗?
yesry 2003-11-13
  • 打赏
  • 举报
回复
bcc32 c:\tmp\cpp1.cpp -B -S -oc:\cpp1.asm
annkie 2003-11-13
  • 打赏
  • 举报
回复
Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland
Available options (* = default setting, xxx = has sub-options: use -h -X):
(Note: -X- or -w-XXX will usually undo whatever was set or unset by -X)
-3 Generate 80386 protected-mode compatible instructions
-4 Generate 80386/80486 protected-mode compatible instructions
-5 Generate Pentium instructions
-6 Generate Pentium Pro instructions
-Axxx Use ANSI keywords and extensions
-B Compile to .ASM (-S), then assemble to .OBJ
-C Enable nested comments
-CP Enable code paging (for MBCS)
-D -D<name> defines 'name' as a null string, or use -D<name>=<value>
-E Specify which assembler to use
-G Optimize for size/speed; use -O1 and -O2 instead
-Hxxx Generate and use precompiled headers
-I Set the include file search path
-Jxxx Template generation options
-K Set default character type to unsigned
-L Library file search path
-M Create a linker map file
-O Optimize jumps
-P Perform C++ compile regardless of source extension
-Q Extended compiler error information
-R Include browser information in generated .OBJ files
* -RT Enable runtime type information
-S Compile to assembly
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
这个选项应该是产生汇编代码的,可是我试了好久都没有成功。
-T Specify assembler option, e.g. -Tx
-U Undefine any previous definitions of name
-Vxxx Compatibility options
-Wxxx Target is a Windows application
-X Disable compiler autodependency output
-axxx Set data alignment boundary. Default is -a8; -a- means -a1
* -b Make enums integer-sized (-b- makes them short as possible)
-c Compile to object file only, do not link
-d Merge duplicate strings
-dc Put strings into the read-only data segment
-dw Put strings into the (writeable) data segment
-e Specify target executable pathname
* -ff Fast floating point
-fp Correct Pentium FDIV flaw
-g Stop batch compilation after n warnings (Default = 255)
-h Request help ('-h -' shows all help). Can be specific: -h -V
-i Set maximum significant identifier length (Default = 250)
-j Stop batch compilation after n errors (Default = None)
* -k Generate standard stack frames
-l Pass options to the linker; example: -ls -l-x
-m Generate makefile dependency information
-md Put dependency info in .d files, not in the object file
-mm Ignore system header files while generating dependency info
-mo Specify the output file for dependency info
-n Set output directory for object files
-o Set output filename (-o<filename> or -o <filename> supported)
-pxxx Use Pascal calling convention
-q Suppress compiler identification banner
-r Use register variables
-rd Use register variables only when register keyword is employed
-s Link using the system's non-incremental linker
-txxx An alternate name for the -Wxxx switches; there is no difference
* -u Generate underscores on symbol names
-vxxx Turn on source debugging
-w Display all warnings
-w! Return non-zero from compiler on warnings
-xxxx Enable exception handling
-y Debug line numbers on
annkie 2003-11-13
  • 打赏
  • 举报
回复
up

13,825

社区成员

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

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