- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Assume that I have a program P and a set of DLLs D1, D2 etc.
Should P and all the DLLs be linked against the same runtime library (say "Multithread DLL")?
Should P be linked against the "Multithread" library and the DLLs against the Multithread DLL library?
It's probably a silly question... but I couldn't find a definite answer to this in the documentation.
Thanks,
Olivier
Should P and all the DLLs be linked against the same runtime library (say "Multithread DLL")?
Should P be linked against the "Multithread" library and the DLLs against the Multithread DLL library?
It's probably a silly question... but I couldn't find a definite answer to this in the documentation.
Thanks,
Olivier
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All should be linked against the same DLL libraries. If you link P with the static libraries, you may get various errors with I/O and dynamic allocation as you will have two separate copies of the libraries in your image.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, this makes sense.
Now, regarding my own DLLs: How can I control the version of these DLLs, in other words, how can I define a version number in my DLL, and then check in my code that the DLL present in the application path is the right version?
Is this something that I need to implement manually (hard codethe version controlin both my code and my DLLs)? Or is there a built-in facility for this? I see that in Project Properties\Linker there is a Version parameter.
Olivier
Now, regarding my own DLLs: How can I control the version of these DLLs, in other words, how can I define a version number in my DLL, and then check in my code that the DLL present in the application path is the right version?
Is this something that I need to implement manually (hard codethe version controlin both my code and my DLLs)? Or is there a built-in facility for this? I see that in Project Properties\Linker there is a Version parameter.
Olivier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only way to do this is with manifests and then have your DLLs in a private or shared assembly. This is a lot of hassle. You can, however, pick up the "file version" information that is set in a resource file by calling GetFileVersionInfo and check that.
![](/skins/images/54BF544B471F3F61DFD338F1D58F9426/responsive_peak/images/icon_anonymous_message.png)
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