Lieven Cardoen
Lieven Cardoen

Reputation: 25969

Creating a dynamic link library with Visual C++ in Visual Studio

I have a link script that links a bunch of obj and lib files into a dll. I'm trying to do the same thing in Visual Studio, but without any luck. Problem is that the project doesn't have any source files. The project needs to take all the lib and obj files and link them to a dll.

Upvotes: 0

Views: 121

Answers (2)

Alex F
Alex F

Reputation: 43331

Create Makefile project. In VC++ 2010: Visual C++ - General - Makefile Project. In the Project properties open Build command line: Configuration properties - NMake - Build command line. Enter the script name here. When you execute Build command, this script is executed.

Upvotes: 1

user1610015
user1610015

Reputation: 6678

I'm not sure you can do it from Visual Studio, but you can do it from the Visual Studio Command Prompt with a command like this:

link /OUT:"Dll.dll" /DLL obj1.obj obj2.obj lib1.lib lib2.lib

Upvotes: 1

Related Questions