Jump to content
  • Advertisement

Archived

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

WildWest

Warning C4251

This topic is 5543 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 have a class in a dll where I want to use std::vector<>. When I compile I get the compiler warning C4251. "var name" class std::vector<...> needs a dll-interface, which is used by clients of class "class where var is declared". I am using VC++6.0 author''s edition. Is there any help out there? The Wild Wild West - Desperado!

Share this post


Link to post
Share on other sites
Advertisement
Yes, I know that you can disable warnings by using #pragma.
But my opinion is that you should not ignore warnings.
I hope there is solution, how it will work without a warning.

So anybody?

The Wild Wild West - Desperado!

Share this post


Link to post
Share on other sites
Use a pointer to a vector instead, and create/destroy it yourself. This should get rid of the problem.

However, this warning is useless (it is there in case you forget to interface one of your own objects, not stl constructs), so I advise disabling it.

Share this post


Link to post
Share on other sites
This is a famouse warning flood and its happened to me before. Ive just been told to ignore the warnings by a lot of people so just ignore them - it won''t create any bad code.

Ignorance is the root of all evil

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!