User Macros Not Available for Visual Studio 2017 Library Paths

Asked 2 years ago, Updated 2 years ago, 75 views

I am using Visual Studio 2017.

The user macro is specified as follows:
Enter a description of the image here

Therefore, to pass the library of the project, you can set the user macro to
I'm using it, but I can't build it.

Enter a description of the image here

The user macro is used for the relative path of the properties of each library above.
When you build it, you do not seem to recognize the user macro.

What's wrong?

visual-studio

2022-09-30 19:16

1 Answers

I think I found out the symptom after continuing to investigate.

In the end, the relative path of the Xxxx file properties in the lower right corner of the IDE screen does not accept macros.

If you expand all the absolute paths for the file properties and look closely, you'll see clearly as soon as you shorten the folder path for the project.

For example, if C:\Work\TestPro was the folder for the project, the relative path would be $(DevKitPath)\Support\Lib\Win\ACAP_STATD.lib, the absolute path would be C:\Work\TestPro\$(DevKitPath)\Support\Lib\Win\ACAP_STATD.code.

And it's a non-existent path and file, and in the second screenshot of the question, there's a yellow triangle on the icon of the file!Marked to indicate invalid specification.

In the previous question and answer, it was a mistake to write that the full/relative path of the Xxx file property appears to be a valid value. I will correct it later.

Even if the user macro is enabled here, the relative path is specified, so the base folder is the folder of the project, and even if it is expanded with a macro that is the absolute path, it cannot be a valid path.

As previously answered, if you want to change the linker's "Additional Library Directory/Additional Dependency Files" setting method, you can apply the user macro, but if you want to leave the file listed in the Solution Explorer pane, you cannot apply the user macro.


2022-09-30 19:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.