开发者

How to create a working Executable file (.exe) from a C code

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 because salflibc.dll was not found, reinstalling the application may fix this 开发者_JAVA技巧problem


salflibc.dll is a library installed by the compiler on your development machine.

  • salf = Salford C Compiler, the obscure compiler included in Silverfrost
  • libc = 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 file

You 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜