-1

目前,我可以通过以下命令使用 windows 命令提示符编译和运行基本的“Hello World”程序:

tcc.test.c 

其次是

test.exe.

其中 test 是包含"Hello World"程序代码的文件的名称。

tcc我将文件夹安装在我的 c:\ 驱动器上。我有另一个需要gsl运行库的程序,但我不知道从哪里以及如何正确安装库以及在程序编译和运行时如何调用它。

4

1 回答 1

0

您可能想阅读以下位置的文档:;。

其中,除其他外说:

-Bdir设置可以找到 tcc 内部库的路径(默认为 PREFIX/lib/tcc')。"

同样令人感兴趣的是:

-Idir' Specify an additional include path. Include paths are searched in the order they are specified. System include paths are always searched after. The default system include paths are: /usr/local/include', /usr/include' and PREFIX/lib/tcc/include'. (PREFIX' is usually /usr' or/usr/local')。"

最后:

-Ldir' Specify an additional static library path for the-l' 选项。默认的库路径是/usr/local/lib',/usr/lib' 和 `/lib'。

-lxxx' Link your program with dynamic library libxxx.so or static library libxxx.a. The library is searched in the paths specified by the-L' 选项。

于 2015-10-24T19:03:37.607 回答