Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

PyroBoy

VC++ 6 Code Generation Settings

This topic is 5957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m building a library that staticly links to another library that was compiled with the "Multithreaded DLL" code generation setting. I want the lib I''m building to be staticly linkable without having to switch the code generation settings on the target project. Is there any way at all to accomplish this scenario without making at least one step (my lib''s link to the external lib or the target''s link to my lib) a dynamic link?

Share this post


Link to post
Share on other sites
Advertisement
Not knowing what CRT stands for, i''d take a guess that the 4 types are:
Single thread release
Multi-thread release
Single thread debug
Multi-thread debug

Shabadoo

Share this post


Link to post
Share on other sites
I''ve already got it going under multithreaded code settings. No problem there.
Since VC++ defaults to the single-threaded code generation option, my question remains...

Share this post


Link to post
Share on other sites
You really need to have everything in the project link to the same library, either static or DLL. Otherwise Bad Things may happen, especially if the library and its users exchange pointers to dynamic memory.

So the answer is that you either need to modify the library you''re linking against to make it use the static CRT, or else modify your own library to use the DLL version. If you''re writing your own DLL it''s generally best to use the DLL version.

--
Eric

Share this post


Link to post
Share on other sites
Check out the sweet snipptes section. I have an article that describes a method of doing so.

However, the more I work with static libraries, the more I am convinced they should not be distributed. It''s less hassle to give the users the source and let the recompile from there.

Share this post


Link to post
Share on other sites
You mean this?:
http://www.gamedev.net/reference/articles/article1316.asp

I don''t see how that relates to my question, but perhaps I picked the wrong article...

>>You really need to have everything in the project link
>>to the same library, either static or DLL. Otherwise
>>Bad Things may happen, especially if the library and
>>its users exchange pointers to dynamic memory.

I''m not sure what you mean here...


Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!