在DOS上使用DJGPP未定义参与" main()"和未定义的引用`hb_vmEx ecute'

时间:2014-08-29 05:20:30

标签: gcc linker dos

我在MSOS 6.22上安装了Harbor 1.0.1 我正在使用djgpp。当我尝试构建exe时,它会出现以下错误

C:\HB101\TEST>BLD TESTPRG                                                       
c:/djgpp/lib/crt0.o:crt0.s:(.data+0xc2): undefined reference to `main'          
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x129): undefined reference to `hb_vmProcessSymbolsEx'                                                                 
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x14b): undefined reference to `hb_vmExecute'                                                                          
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x168): undefined reference to `hb_vmExecute'                                                                          
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x185): undefined reference to `hb_vmExecute'                                                                          
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1a2): undefined reference to `hb_vmExecute'                                                                          
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1bf): undefined reference to `hb_vmExecute'                                                                          
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1dc): more undefined references to `hb_vmExecute' follow                                                             
c:/djgpp/bin/ld.exe: c:/djgpp/tmp/ccpmwnoY.o: bad reloc address 0x0 in section `.data'                                                                          
c:/djgpp/bin/ld.exe: final link failed: Invalid operation                       
collect2.exe: error: ld returned 1 exit status 

我已经获得了所有必需的lib文件,那么为什么会出现这个错误?

0 个答案:

没有答案