- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am building a console application (.exe).
The project links with a library that I specified
using 'Project Settings'/'Link'/'Input'.
I do wish do drag and drop the library into the
project view.
When the library is newer than the executable
and no source files have changed, I expect the
'build' command to cause the application to be
re-linked. But this does not happen.
What compiler/linker option do I need to set?
I do not mind doing this by typing an option
instead of just clicking a checkbox.
Thanks,
Gilles
The project links with a library that I specified
using 'Project Settings'/'Link'/'Input'.
I do wish do drag and drop the library into the
project view.
When the library is newer than the executable
and no source files have changed, I expect the
'build' command to cause the application to be
re-linked. But this does not happen.
What compiler/linker option do I need to set?
I do not mind doing this by typing an option
instead of just clicking a checkbox.
Thanks,
Gilles
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you set the library that way, the build system doesn't see it - it's just a list of files given to the linker. The better way is to add the library to the project as if it were a source file. That way you don't even need to change the directories list.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve L. Then how do I do if I want to link the debug version of my application with the debug version of the library and the release version of the application with the release version of the library?
Gilles.
Gilles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The way I'd do this is to make the library project a subproject (dependent project) of your main project. Then when you build the main project, it will automatically rebuild the library if needed and will link to the appropriate variant.
Steve
Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page