![]() |
1
11
|
![]() |
2
4
从GCC手册页: -v Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper. -l library Search the library named library when linking. (The second alternative with the library as a separate argument is only for POSIX compliance and is not recommended.) It makes a difference where in the command you write this option; the linker searches and processes libraries and object files in the order they are specified. Thus, foo.o -lz bar.o searches library z after file foo.o but before bar.o. If bar.o refers to functions in z, those functions may not be loaded. The linker searches a standard list of directories for the library, which is actually a file named liblibrary.a. The linker then uses this file as if it had been specified precisely by name. The directories searched include several standard system directories plus any that you specify with -L. Normally the files found this way are library files---archive files whose members are object files. The linker handles an archive file by scanning through it for members which define symbols that have so far been referenced but not defined. But if the file that is found is an ordinary object file, it is linked in the usual fashion. The only difference between using an -l option and specifying a file name is that -l surrounds library with lib and .a and searches several directories.
|
![]() |
3
1
您只需使用
|
![]() |
4
0
以-l开头的参数指定链接到程序的库。正如pablosantacruz所说,-lm是标准的数学库,-lfftw3是傅里叶变换库。 |
![]() |
5
0
尝试
从
所有这些语句的要点是它们将您的代码文件编译成一个程序,该程序将被命名为default(a.out),并且依赖于来自math和fourier transform libs的函数调用。v语句只是帮助您跟踪编译过程并诊断应该发生的错误。 |
![]() |
6
0
除了
我的mingwgcc3.4.5安装从
这也是一个好主意,阅读
official manual for GCC
. 阅读链接器的文档也很有帮助(
熟悉Unix工具的命令行样式也很有帮助。单个字符选项的值不能从选项名中分隔的想法基本上可以追溯到Unix。现代惯例(由GNU颁布),多字符选项名称由
|
![]() |
CaTx · 使用带有一个大于号和两个大于号的回波的区别 2 年前 |
![]() |
Ari157 · x86_64 Linux程序集中的逻辑与实现 2 年前 |
![]() |
Ty Q. · 分段故障GLFW3/GLAD 3 年前 |
![]() |
ShortArrow · 如何使用git管理链接源文件? 3 年前 |
![]() |
Bastien L. · 多Linux Grafana集成 3 年前 |