mmedia linking error

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Abdulhamid Dhaiban
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Jan 05, 2005 10:55 pm
Location: egypt - cairo
Contact:

mmedia linking error

Post by Abdulhamid Dhaiban » Wed Jan 05, 2005 11:28 pm

Dear Friends,

I have an linking error with mmedia library in wxWindows (windows 98 and visual studio 6).

one of them:
mmedia.lib(sndfile.obj) : error LNK2005: "public: __thiscall wxString::~wxString(void)" ([email protected]@[email protected]) already defined in wxmsw24.lib(wxmsw24.dll)

there are 71 linking error.
????

Does any one know how to solve this error

Thanks in advance

Dhaiban
Plan before you begin

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Thu Jan 06, 2005 7:46 am

Check your threading model. You also need to give more details about what you want to link etc.

Usually when you have linker errors like that (with wxString) my experience is that your threading model is set wrong. I think it should be Multi Threading Debug DLL (for debugging), on all libs you want to compile and link together. This way wxWidgets specific stuff doesn't get linked twice or more in different libs ..

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Thu Jan 06, 2005 8:06 am

Hi!
I think it should be Multi Threading Debug DLL (for debugging)
Just a little sidenote: I'd recommend compiling the (static) libs using "Multi Threading Debug". You'll have to change that in the config for each lib in 2.5.x. Doing so will link your code to the standard msvcrt.dll instead of the version specific ones (msvc7x.dll). I recognizes that using the compiler specific ones may get you into trouble when using the app on other platforms/OSes.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

Abdulhamid Dhaiban
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Jan 05, 2005 10:55 pm
Location: egypt - cairo
Contact:

Post by Abdulhamid Dhaiban » Thu Jan 06, 2005 10:15 am

Dear friends,

Thank you for your replies.

In fact i don't know how to change the multi threading configuration , and i don't understand about (i'm a wx bigginer).

Here are more detail about my link error :

I am trying to run contrib\samples\mmedia sample code which use contrib\lib\mmedia.lib and the resulted errors are 71 error
like the one i mentioned above.

not only for wxString also the error occure for other classes like wxWindowBase and wxWindow ..etc.

I think in my problem, the conflict occur between mmedia.lib and wxmsw24.lib

:arrow:

please friends, more clear solution is needed.

Thank you very much...

Dhaiban
Plan before you begin

Post Reply