0

Let me elaborate the question. I've a solution file, let's call it testapp.sln and I build this solution as follows,

devenv.exe C:\fd1\fd2\fd3\fd4\testapp.sln \build Debug|Win32

The thing is because of few modifications in this project, I now need to use some new functions from another .lib file whose name isn't fixed. The name of the folder in which this .lib resides is not constant. It is based on platform, debug/release, x86/x64 etc. For example,

  1. While compiling for Win7 Debug, location of lib file might be c:\fd1\_obj_win7_32_debug_uwin\new.lib

  2. While compiling for Windows 8 x64 Debug, location of lib file might be c:\fd1\_obj_win8_64_debug_uwin\new.lib

So how I can provide the location of lib file either in .sln or via command-line?

Thanks

nikhil
  • 29
  • 5
  • 2
    Did you try the obvious thing, editing the Linker + General + Additional Library Directories setting? Repeat for each configuration. – Hans Passant May 07 '14 at 12:43
  • I ended up doing the same thing eventually. Actually I was looking for some general solution and not configuration specific. I was hoping to make use of macros but I guess you can't create new and need to make use of available ones. – nikhil May 19 '14 at 08:56

2 Answers2

0

In older versions of VisualStudio I used to find an menu element under Project/Properties. And there, I could configure different elements of project either for all configuration (x86, x64, Release, Debug, ...) or configuration by configuration. You should find the list of additional libraries in these items.

Serge Ballesta
  • 143,923
  • 11
  • 122
  • 252
0

Instead of using relative paths, you could also use the predefined macros of VS to achieve this.

$(ProjectDir) points to the directory of your .vcproj file, $(SolutionDir) is the directory of the .sln file.

check the link of the related discussion

Community
  • 1
  • 1
DNamto
  • 1,342
  • 1
  • 21
  • 42
  • Existing macros were not enough to make up the name. I hard coded paths in the Additional Library Settings under linker settings as an alternate solution. thanks. – nikhil May 19 '14 at 08:58