记Libsx安装过程及简单使用

    技术2025-01-13  63

    Libsx安装及简单使用

    最后编辑时间:2020年7月4日

    环境 

    Ubuntu16.04 64位

    安装

    Deb包安装方式:sudo apt-get update sudo apt-get install libsx-dev

    简单使用

     创建main.cpp文件,写入如下内容。

    #include <libsx.h> int main() { MakeLabel("Hello World"); MainLoop(); return 0; }

    在终端中输入命令编译:gcc main.cpp -o main -lsx 编译成功后,执行:./main 显示结果如下:

    更多 

    安装及使用过程中遇到的问题可参考如下文章:1、fatal error: X11/Intrinsic.h: No such file or directory 2、fatal error: X11/Xaw3dxft/Command.h: No such file or directory compilation terminated.

    libsx文档:https://web.physics.wustl.edu/marty/libsx/libsx.html 

    Processed: 0.022, SQL: 9