I'm making two trivial C++/CLI projects, one is an executable and the other is a DLL. In the executable, I write
and it gives me error c1107, which I though would be easy to solve. I googled for LIBPATH and went to Linker, General, Additional Library Directories and added the folder containing DllLibName.dll and it still wouldn't work. Same error.
I tried replacing the directive with
and everything works. I don't wanna have to type in the full absolute path. What am I missing? This feels so stupid.
Are the two projects in the same Solution? If so, then don't use #using, add a reference to the other project, and let Visual Studio take care of the paths.
Probably in your case the path must be set for the compiler, not the linker.
Properties -> C/C++ -> General -> "Resolve #using References" or see the documentation for the AI-flag