首页 > 解决方案 > 从文件管理器打开编译的 C 程序

问题描述

如果我有一个已编译的具有 GUI 的 C 程序,我如何制作可执行文件以从文件管理器而不是终端启动程序?我已经用 GCC 编译了程序,但我只能从终端启动它。当我从文件管理器打开它时,我收到一条错误消息,提示“没有为共享库文件安装应用程序”。我在 Ubuntu Mate 中使用 C 语言中的 IUP GUI 库。该文件是一个共享库,但它是用 GCC 编译的。GCC 正在创建一个共享库,但我想创建一个可执行文件。它从终端打开。

标签: c

解决方案


You (usually) can't execute a library. That's what applications are for. How do you "call" your library from the terminal? There are utilities like rundll.exe (Windows) or dlcall (Unix) which allow "execution" of libraries (actually, they just load the library and call the function from the library, so the utility is actually called first instance).


推荐阅读