Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 osx 如何运行我在互联网上获得的带有 .a 和另一个带有 .h 文件的程序的程序。
我正在使用mac终端。
带有.a扩展名的archive library文件是一个,而带有扩展名的文件.h是一个header file公开库内部的文件。
.a
archive library
.h
header file
这些文件无法运行!
您需要在源代码中包含标头 (.h) 并使用例如链接库(此处为 ``libx)
gcc -o myprog myprog.c -L/path/to/libx -lx