gpt4 book ai didi

c - eiffel c编译失败: error LNK2001: unresolved external symbol

转载 作者:太空宇宙 更新时间:2023-11-04 07:51:19 26 4
gpt4 key购买 nike

我想熟悉 Eiffel 语言,所以我安装了 Eiffel Studio 18 并创建了一个图形应用程序。编译失败并显示消息:

Preparing C compilation using already configured msc C compiler...
ERROR: Cannot start "nmake".ERROR: Cannot start "nmake".

文档表明 espawn 实用程序可能会显示可用的工具链,但它似乎崩溃了:

PS C:\Program Files\Eiffel Software\EiffelStudio 18.07 GPL\tools\spec\win64\bin> & "C:\Program Files\Eiffel Software\EiffelStudio 18.07 GPL\tools\spec\win64\bin\espawn.exe" -l
Eiffel Environment Command Spawn Utility - Version: 18.07
Copyright Eiffel Software 1985-2018. All Rights Reserved.

Available C/C++ compilers:


espawn: system execution failed.
Following is the set of recorded exceptions:

******************************** Thread exception *****************************
In thread Root thread 0x0 (thread id)
*******************************************************************************
-------------------------------------------------------------------------------
Class / Object Routine Nature of exception Effect
-------------------------------------------------------------------------------
APPLICATION root's creation Segmentation violation:
<000000000363C588> Operating system signal. Exit
-------------------------------------------------------------------------------
APPLICATION root's creation
<000000000363C588> Routine failure. Exit
-------------------------------------------------------------------------------

不幸的是,除了那个 espawn util 之外,我找不到任何与工具链相关的东西,所以我尝试从 VS 开发命令提示符启动 Eiffel Studio,希望它可能隐式依赖某些环境变量。这确实有帮助,但是编译仍然因链接器错误而失败:

Preparing C compilation using already configured msc C compiler...
big_file_C28_c.c
eoption.c
big_file_E2_c.c
big_file_C26_c.c
big_file_C27_c.c
big_file_C30_c.c
big_file_C29_c.c
big_file_C31_c.c
eref.c
epoly.c
esize.c
big_file_C25_c.c
big_file_C24_c.c
big_file_C23_c.c
big_file_C22_c.c
big_file_C21_c.c
big_file_C20_c.c
big_file_C19_c.c
eplug.c
eskelet.c
enames.c
evisib.c
big_file_C18_c.c
big_file_C17_c.c
big_file_C16_c.c
big_file_C15_c.c
big_file_C13_c.c
big_file_C14_c.c
ececil.c
big_file_C12_c.c
einit.c
eparents.c
big_file_C11_c.c
big_file_C10_c.c
big_file_C9_c.c
big_file_C8_c.c
big_file_C7_c.c
big_file_C6_c.c
big_file_C5_c.c
big_file_C4_c.c
big_file_C3_c.c
big_file_C2_c.c
big_file_C1_c.c
Скопировано файлов: 1.
emain.c
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 14.16.27024.1
Copyright (C) Microsoft Corporation. All rights reserved.

-STACK:5000000 -NODEFAULTLIB:libc -STACK:5000000 -NODEFAULTLIB:libc -SUBSYSTEM:WINDOWS -OUT:my_wel_application_1.exe
e1\emain.obj
"C:\Program Files\Eiffel Software\EiffelStudio 18.07 GPL\studio\spec\win64\lib\msc\finalized.lib" "C:\Program Files\Eiffel Software\EiffelStudio 18.07 GPL\library\wel\spec\msc\win64\lib\wel.lib"
USER32.lib WS2_32.lib ADVAPI32.lib GDI32.lib SHELL32.lib MSIMG32.lib COMDLG32.lib UUID.lib OLE32.lib OLEAUT32.lib COMCTL32.lib MPR.LIB SHLWAPI.LIB WINSPOOL.LIB
my_wel_application_1.res
E2\Eobj2.lib E1\eparents.obj E1\einit.obj E1\ececil.obj E1\evisib.obj
E1\enames.obj E1\eskelet.obj E1\eplug.obj E1\esize.obj E1\epoly.obj
E1\eref.obj E1\eoption.obj C31\Cobj31.lib C30\Cobj30.lib C29\Cobj29.lib
C28\Cobj28.lib C27\Cobj27.lib C26\Cobj26.lib C25\Cobj25.lib C24\Cobj24.lib
C23\Cobj23.lib C22\Cobj22.lib C21\Cobj21.lib C20\Cobj20.lib C19\Cobj19.lib
C18\Cobj18.lib C17\Cobj17.lib C16\Cobj16.lib C15\Cobj15.lib C14\Cobj14.lib
C13\Cobj13.lib C12\Cobj12.lib C11\Cobj11.lib C10\Cobj10.lib C9\Cobj9.lib
C8\Cobj8.lib C7\Cobj7.lib C6\Cobj6.lib C5\Cobj5.lib C4\Cobj4.lib
C3\Cobj3.lib C2\Cobj2.lib C1\Cobj1.lib
finalized.lib(econsole.obj) : error LNK2001: unresolved external symbol __iob_func
finalized.lib(console.obj) : error LNK2001: unresolved external symbol __iob_func
finalized.lib(file.obj) : error LNK2001: unresolved external symbol __iob_func
finalized.lib(main.obj) : error LNK2001: unresolved external symbol __iob_func
finalized.lib(except.obj) : error LNK2001: unresolved external symbol __iob_func
finalized.lib(sig.obj) : error LNK2001: unresolved external symbol __iob_func
finalized.lib(option.obj) : error LNK2001: unresolved external symbol __iob_func
finalized.lib(main.obj) : error LNK2019: unresolved external symbol _set_output_format referenced in function eif_rtinit
finalized.lib(run_idr.obj) : error LNK2001: unresolved external symbol sprintf
finalized.lib(except.obj) : error LNK2001: unresolved external symbol sprintf
finalized.lib(out.obj) : error LNK2001: unresolved external symbol sprintf
finalized.lib(file.obj) : error LNK2001: unresolved external symbol sprintf
finalized.lib(store.obj) : error LNK2001: unresolved external symbol sprintf
finalized.lib(econsole.obj) : error LNK2019: unresolved external symbol vfprintf referenced in function print_err_msg
finalized.lib(file.obj) : error LNK2019: unresolved external symbol fscanf referenced in function rt_swallow_nl
finalized.lib(retrieve.obj) : error LNK2019: unresolved external symbol sscanf referenced in function iread_header_new
finalized.lib(run_idr.obj) : error LNK2001: unresolved external symbol sscanf
my_wel_application_1.exe : fatal error LNK1120: 6 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.EXE"' : return code '0x460'
Stop.

最佳答案

从VS开发命令提示符运行时的编译错误与C编译器版本和使用的Eiffel运行时库不匹配有关。在启动编译之前设置相应的环境变量应该可以解决这个问题:

    set ISE_C_COMPILER=msc_vc140

关于原来的错误,由于某些原因,C编译在某些机器上失败,因为EiffelStudio找不到VS。这个问题甚至变成了FAQ。 .

关于c - eiffel c编译失败: error LNK2001: unresolved external symbol,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53690535/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com