Add a Dependent Library to the Developer Command Prompt for VS 2017

Asked 2 years ago, Updated 2 years ago, 97 views

There is a project I would like to build directly with the developer command prompt for VS 2017.
The dependent library is not found and a link error.
I have the library itself, but how can I link it to a developer command?

The project you want to build is MRuby 2.0.1 and the dependent library is onigmo_s.lib.

c++ visual-studio

2022-09-30 19:15

1 Answers

Do not use IDE to link third-party libraries at command prompts
I interpreted it as .

Makefile or msbuild to add options for link.exe to the linking stage.Or write #pragma comment(lib, "...lib") in the source.

Specify additional library links—Specify the library name directly.

link<Various Designations 1>onigmo_s.lib<Various Designations 2>

Library directory specification—Add the command line /LIBPATH:<dir>.

link/LIBPATH: "C:\projects\onigmo"

Or

cl<Various>/LINK/LIBPATH: "C:\projects\onigmo"


2022-09-30 19:15

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.