Jump to content
  • Advertisement

Archived

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

billybob

DLL trouble with stl headers

This topic is 5353 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 am working on splitting a pretty big project up into some Dlls, but I get nothing but this when I compile:
...include\new(34) : error C2732: linkage specification contradicts earlier specification for ''delete''
        ...new(34) : see declaration of ''delete''
...include\new(35) : error C2732: linkage specification contradicts earlier specification for ''new''
        ...include\new(35) : see declaration of ''new''
...include\new(42) : error C2733: second C linkage of overloaded function ''new'' not allowed
        ...new(41) : see declaration of ''new''
...include\wchar.h(700) : error C2733: second C linkage of overloaded function ''wmemchr'' not allowed
        ...wchar.h(699) : see declaration of ''wmemchr''
...wchar.h(702) : error C2733: second C linkage of overloaded function ''wcschr'' not allowed
        ...wchar.h(701) : see declaration of ''wcschr''
 
(removed directories to try and make the post a little more readable) I''m pretty sure I know what the problem is, there is an extern "C" around all these errors. How do I remove this/fix the problem? there are many stl headers, mostly string, list, vector, fstream, map, and algorithm. I get errors on those too, but I''m pretty sure the cause of both is the same problem. it is a MFC project using MFC in a shared dll. any help would be great

Share this post


Link to post
Share on other sites
Advertisement
Use the multithreaded DLL runtime (both in your project and in the DLL itself).


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
— Brian W. Kernighan (C programming language co-inventor)


[edited by - Fruny on January 14, 2004 7:00:15 PM]

Share this post


Link to post
Share on other sites
I found the problem, in the DLL projects that give me this, I'm including the directx headers. If I include the DX headers at the very last, I only get a few, but I CANNOT make the few go away, no matter what I do. It seems I can only include either the DX headers, or my other DLL project's headers, not both at the same time. How do I prevent DX from doing this?

its not limited to the DX headers, just any two headers from two projects.

[edited by - billybob on January 15, 2004 6:48:40 PM]

Share this post


Link to post
Share on other sites
Would that 'dependancy of' thing when I created the project have anything to do with this? if so, how would I go about setting that after the project is created

edit: DOH i'm a friggin retard. i looked all over the Project->Settings for quite a while, and its sitting right on the menu before it.

edit again: it didn't help though, still the same errors.

[edited by - billybob on January 15, 2004 9:57:06 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
try defining a unique define, and only re-include the header if its not defined...

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!