簡體   English   中英

Tiny C編譯器鏈接我的匯編對象文件

[英]Tiny C Compiler link my assembly object file

是否可以鏈接在cc中用nasm生成的* .o文件?

使用gcc對我來說效果很好:

nasm -f win32 -o fastmath.o fastmath.asm
gcc -o powerTest.exe powerTest.cpp cexport.o

當我嘗試使用tcc執行相同的過程時,出現以下錯誤:fastmath.o:1:錯誤:無法識別的文件

set name=test
set tccpath=C:\TCC\
set nasmpath=C:\NASM\

%nasmpath%nasm -f win32 -o fastmath.o fastmath.asm

%tccpath%tcc -c main.c
%tccpath%tcc -vv -luser32 -lgdi32 -lopengl32 -lglu32 -o %name%.exe main.o fastmath.o

我是否忘記了編譯選項中的某些內容?

Tcc無法處理-f win32。 使用-f coff代替。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM