gpt4 book ai didi

c++ - 扩展名为 .f 的文件如何生成

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:50:44 24 4
gpt4 key购买 nike

在 ubuntu 15.04 中执行命令“make”后,我发现文件 .*.o.d 的内容如下:

objdir.o: objdir.cpp /usr/lib/gcc/i486-linux-gnu/4.4.3/include/stdarg.h \
/usr/include/assert.h /usr/include/features.h \
/usr/include/bits/predefs.h /usr/include/sys/cdefs.h \
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
/usr/include/gnu/stubs-32.h ../include/ntstatus.h ../include/windef.h \
../include/winnt.h ../include/basetsd.h /usr/include/ctype.h \
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
/usr/include/endian.h /usr/include/bits/endian.h \
/usr/include/bits/byteswap.h /usr/include/xlocale.h \
/usr/lib/gcc/i486-linux-gnu/4.4.3/include/stddef.h /usr/include/string.h \
/usr/include/bits/string3.h ../include/pshpack2.h ../include/poppack.h \
../include/pshpack4.h ../include/guiddef.h ../include/pshpack8.h \
../include/winternl.h debug.h object.h list.h unicode.h objdir.h \
object.inl ntcall.h thread.h timer.h fiber.h token.h mem.h \
/usr/include/unistd.h /usr/include/bits/posix_opt.h \
/usr/include/bits/environments.h /usr/include/bits/confname.h \
/usr/include/getopt.h /usr/include/bits/unistd.h process.h symlink.h

但是在那些文件中我得到了错误的路径 - 例如/usr/lib/gcc/i486-linux-gnu/4.4.3 必须是/usr/lib/gcc/i686-linux-gnu/4.9那么这些文件如何生成以及我如何更改这些文件中的路径?

最佳答案

您可以在gnu 环境中使用gcc -MM 生成依赖文件(.d)。来自 this page :

The solution is fairly simple: every time we build a .o file, we also create a file with extension .d (for dependency) that records which files were used to create the corresponding .o file. (Note that we do not create the .d files ahead of time, in contrast to some approaches.) The .d files will be written in the make language itself, and included into the primary Makefile. We can generate the files using the -MM option of gcc

关于c++ - 扩展名为 .f 的文件如何生成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31727769/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com