Board index » Visual Studio » Link with an EXE with Project Dependencies

Link with an EXE with Project Dependencies

Visual Studio142
Hi,

Iâ??m trying to link a DLL with an EXE that exports some symbols. If I use the

Project Dependencies tool, it does not work. But if I add it as an input

library, it work. Is it a bug or am I missing something?

Thanks


-
 

Re:Link with an EXE with Project Dependencies

The linker does not know where the symbols are unless the library header

contains a statement like #pragma comment(lib, "library_name.lib") - which

is Microsoft-specific, and in this case the library path should be listed in

the Options | Directories | Library Files. Otherwise, you have to manually

add the library path\filename in the project settings - and this is normal.



"Eric Robert" <EricRobert@discussions.microsoft.com>wrote in message

Quote
Hi,

I'm trying to link a DLL with an EXE that exports some symbols. If I use

the

Project Dependencies tool, it does not work. But if I add it as an input

library, it work. Is it a bug or am I missing something?

Thanks







-

Re:Link with an EXE with Project Dependencies

Well, you don't always have to. For instance, you can simply use the Project

Dependencies tool to build a DLL linked with other DLL or static LIB that are

in your solution. Visual is going to add the library in the linker command by

itself. My point was that it doesn't seem to work if its an EXE.



"rg" wrote:



Quote
The linker does not know where the symbols are unless the library header

contains a statement like #pragma comment(lib, "library_name.lib") - which

is Microsoft-specific, and in this case the library path should be listed in

the Options | Directories | Library Files. Otherwise, you have to manually

add the library path\filename in the project settings - and this is normal.



"Eric Robert" <EricRobert@discussions.microsoft.com>wrote in message

news:491142D7-DFB7-46D7-B48F-8E835F4965EA@microsoft.com...

>Hi,

>I'm trying to link a DLL with an EXE that exports some symbols. If I use

>the

>Project Dependencies tool, it does not work. But if I add it as an input

>library, it work. Is it a bug or am I missing something?

>Thanks

>







-