如何在 Visual Studio 中获取组成项目的所有源文件?

问题描述 投票:0回答:1

对于由许多大型 C++ 项目组成的相当复杂的 Visual Studio 2013 解决方案,如何获取最终出现在特定目标平台/体系结构的可执行文件中的所有源代码文件的路径?这应该包括应用程序间接依赖的所有项目的源代码。示例:

Solution
|
+-- Project: Application (depends on "Library A")
|   |
|   + File: defs.h
|   |
|   + File: main.cpp
|
+-- Project: Library A (depends on "Library B")
|   |
|   + File: libA.h
|   |
|   + File: libA.cpp
|
+-- Project: Library B
    |
    + File: libB.h
    |
    + File: libB.cpp

在上面,假设

Application
依赖于
Library A
Library A
依赖于
Library B
。检查
Application
项目时,我要查找的是文件
defs.h
main.cpp
libA.h
libA.cpp
libB.h
libB.cpp
.

》的路径列表。

我希望尽可能依赖构建工具提供的信息,例如传递给编译器的确切命令行或某些依赖关系图。我不想编写一个尝试从头开始提取所有信息的脚本。

目前,我对二进制/预编译库的依赖关系不感兴趣,而只对以一种或另一种方式最终出现在最终可执行文件中的源代码文件感兴趣。

c++ visual-studio dependencies
1个回答
0
投票

严重性代码描述项目文件行抑制状态 错误 XA5301:由于 MAX_PATH,无法生成类的 Java 类型:Android.Support.V13.View.Inputmethod.InputConnectionCompat/IOnCommitContentListenerImplementor:System.IO.DirectoryNotFoundException:找不到路径“C:\Users\santh\”的一部分OneDrive\Desktop ca(3 年) 教学大纲\SmartHotel360-Mobile-master\Source\SmartHotel.Clients\SmartHotel.Clients.Android\obj\Debug\90 ndroid\src\mono ndroid\support 13 iew\inputmethod\InputConnectionCompat_OnCommitContentListenerImplementor .java'。 在 System.IO.__Error.WinIOError(Int32 errorCode, String MaybeFullPath) 在System.IO.FileStream.Init(字符串路径,FileMode模式,FileAccess访问,Int32权限,布尔useRights,FileShare共享,Int32 bufferSize,FileOptions选项,SECURITY_ATTRIBUTES secAttrs,字符串msgPath,布尔bFromProxy,布尔useLongPath,布尔checkHost) 在 System.IO.FileStream..ctor(字符串路径、FileMode 模式、FileAccess 访问、FileShare 共享、Int32 bufferSize) 在 /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build 中的 Microsoft.Android.Build.Tasks.Files.CopyIfStreamChanged(流流,字符串目的地) .BaseTasks/Files.cs:第 170 行 在 Xamarin.Android.Tasks.GenerateJavaStubs.CreateJavaSources(IEnumerable`1 javaTypes、TypeDefinitionCache 缓存、MarshalMethodsClassifier 分类器、布尔值 useMarshalMethods) 0

© www.soinside.com 2019 - 2024. All rights reserved.