如何修复未解决的代码块外部?

时间:2015-11-15 19:17:46

标签: c++ borland-c++

最近我安装了CodeBlocks和Borland C ++作为编译器来制作C程序。但是当我开始构建它时会出错。

bcc32.exe -q   -IE:\Borland\Include -o"C:\Users\thamidu\Documents\Thamidu's Documens\Self Learning\C++\helloc.obj" -c "C:\Users\thamidu\Documents\Thamidu's Documens\Self Learning\C++\helloc.c"
C:\Users\thamidu\Documents\Thamidu's Documens\Self Learning\C++\helloc.c:
ilink32.exe -q -ap   -LE:\Borland\Lib -LE:\Borland\Lib\PSDK c0x32 "C:\Users\thamidu\Documents\Thamidu's Documens\Self Learning\C++\helloc.obj","C:\Users\thamidu\Documents\Thamidu's Documens\Self Learning\C++\helloc.exe",,,,
Error: Unresolved external '___CRTL_VCL_Init' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_MEM_UseBorMM' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_VCLLIB_Linkage' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__ExceptInit' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external 'GetModuleHandleA' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__startup' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__GetExceptDLLinfoInternal' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external 'HeapAlloc' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_SetValue' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_InitThread' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_Alloc' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_GetValue' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external 'GetProcessHeap' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external 'HeapFree' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_ExitThread' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_Free' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '_printf' referenced from C:\USERS\THAMIDU\DOCUMENTS\THAMIDU'S DOCUMENS\SELF LEARNING\C++\HELLOC.OBJ
Error: Unresolved external '__matherr' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__matherrl' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__fmode' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__argv_expand_ptr' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__wargv_expand_ptr' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__handle_setargv' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__handle_exitargv' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__handle_wsetargv' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__handle_wexitargv' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__fileinfo' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__setargv__' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__setenvp__' referenced from E:\BORLAND\LIB\C0X32.OBJ
Error: Unresolved external '__turboFloat' referenced from E:\BORLAND\LIB\C0X32.OBJ
Process terminated with status 2 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

请问我怎么能摆脱这个?感谢

1 个答案:

答案 0 :(得分:2)

那些缺少的符号来自Borland-C ++编译器库。

由于您正在使用Code :: Blocks,请将这些内容添加到项目构建选项的Link Libraries窗格中(菜单栏 - >项目选项 - >链接器设置):

  • cw32.lib - 单线程
  • cw32i.lib - 单线程(动态)
  • cw32mt.lib - Multi Threaded
  • cw32mti.lib - 多线程(动态)