如何从 C 代码创建工作可执行文件 (.exe)
我有一个在 Plato3 中创建的 C 代码。我想创建一个 exe 文件,以便与其他人共享。 有人可以告诉我这怎么可能吗?
我尝试过发送正常编译时创建的exe文件,但每次在我以外的计算机上运行时它都会崩溃......
请帮忙, 谢谢:)
[编辑]
在 windows xp 或 vista 上运行的程序..同样的错误: 使用的编译器:SilverFrost (Fortran/C/C++) Development Studio (Plato3)
该应用程序无法启动 因为找不到
salflibc.dll
, 重新安装应用程序可能会修复 这个问题
I have a C code created in Plato3. I want to create an exe file so I can share it with others.
Can someone please tell me how is this possible ?
I have tried sending the exe file that is created when normally compiled, but it crashes every time in runs on computers other than mine ...
Please help,
Thanks :)
[EDIT]
Program running on windows xp or vista .. same error :
Compiler used : SilverFrost (Fortran/C/C++) Development Studio (Plato3)
This application has failed to start
becausesalflibc.dll
was not found,
reinstalling the application may fix
this problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
salflibc.dll
是编译器在您的开发计算机上安装的库。salf
= Salford C 编译器,Silverfrost 中包含的不起眼的编译器libc
= C 语言运行时支持库,任何程序的基本功能所必需的.dll = 动态链接库,即与
.exe
文件分开的文件您可能会寻找类似于“静态链接运行时库”的编译器选项;这可能会消除 DLL 依赖性。然而,如果编译器能够做到这一点,人们会期望它成为默认方式,即使不是唯一的方式。
然而,我记得过去的经典 Mac 操作系统有时会使用 DLL 运行时库,好处是可升级。不过,有时是一个关键词。 (我想当编译器供应商是操作系统供应商时,就像 MSVC 或 Apple GCC 一样,这是常态。)
该环境的另一个技巧是将有问题的 DLL 放入应用程序的目录中,并与应用程序一起分发。通常,运行时 DLL 会获得免费重新分发的许可。
salflibc.dll
is a library installed by the compiler on your development machine.salf
= Salford C Compiler, the obscure compiler included in Silverfrostlibc
= C-language runtime support library, necessary for the basic functionality of any program.dll
= dynamically-linked library, i.e. a separate file from your.exe
fileYou might look for a compiler option that looks like "statically link runtime library;" this might eliminate the DLL dependency. However, if the compiler were capable of doing that, one would expect it to be the default, if not the only way.
However, I recall from the olden days of Classic Mac OS that sometimes DLL runtime libraries were used, the benefit being upgradability. Sometimes is a key word, though. (I suppose when the compiler vendor is the OS vendor, as with MSVC or Apple GCC, it is the norm, though.)
Another trick from that environment was to put the DLL in question in the application's directory and distribute it with the app. Typically runtime DLLs are licensed for free redistribution.
至少您必须确保可执行文件在编译它的同一体系结构/操作系统上运行。
此外,您需要确保所需的任何第三方或系统库也在其他系统上可用。
更新
根据您提供的新信息和错误消息,看来您需要重新分发 salflibc.dll
我同意其他评论者的观点,并建议使用更主流的不同开发平台,或支持。
At the very least you have to make sure that the executable is running on the same architecture/operating system that it was compiled on.
Additionally, you need to make sure that any third party, or system libraries that are needed are available on the other systems too.
update
Based on the new information and error message you provide, it looks like you need to re-distribute the salflibc.dll
I would agree with other commenter's and suggest a different platform for development that is more mainstream, or supported.