Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
1>mfcs90.lib(oleexp.obj) : error LNK2005: _DllGetClassObject@12 already defined in strmbase9.lib(dllentry.obj)
1>mfcs90.lib(oleexp.obj) : error LNK2005: _DllCanUnloadNow@0 already defined in strmbase9.lib(dllentry.obj)


How can i resolve it?
Update 1:
Has somebody faced the problem?
Update 2:
MFC library does not contain the symbols.
Windows SDK contains the symbols.

Also there is an error in MFC lib files:
without including header files occures undefined symbols message.

All global MFC function have prefix "Afx" - so that is not MFC Functions or IT IS THE BIGEST ERROR EVER PRODUCED.

So tell me what to do with your bugs?
Posted
Updated 4-Mar-11 2:51am
v4
Comments
Sandeep Mewara 3-Mar-11 9:44am    
Sure, not a missing file reference this time? :)
[no name] 4-Mar-11 8:51am    
Resolved using VS 8.0.
Problem is in C:\Program Files\Microsoft SDKs\Windows\v6.0A.

It seems that Microsoft has had this bug too. http://support.microsoft.com/kb/962924[^].

"You can work around this build issue by adding a call to AFX_MANAGE_STATE(AfxGetStaticModuleState()) as the first line in either InitInstance() or ExitInstance().".

Also, besides 2 results of you asking this question, that page was the top result in google[^].
 
Share this answer
 
Comments
[no name] 4-Mar-11 4:18am    
This does not do help and produce error messages.
error C3861: 'AFX_MANAGE_STATE': identifier not found
Andrew Brock 4-Mar-11 7:19am    
For my version of MFC, AFX_MANAGE_STATE is defined in afxstat_.h, which is included from afx.h, which is included from afxwin.h.
To get this definition, #include <afxwin.h>

I haven't had this error, so all I can only really tell you is what is on that page I linked you to.
According to MSDN Link2005 error can occure due to following resaons

•Accidentally linking with both the single-threaded and multithreaded libraries. Ensure that the application project file includes only the appropriate libraries and that any third-party libraries have appropriately created single-threaded or multithreaded versions.

•Mixing static and dynamic libraries when also using /clr.

•The symbol is a packaged function (created by compiling with /Gy) and was included in more than one file but was changed between compilations. Recompile all files that include symbol.

•The symbol is defined differently in two member objects in different libraries, and both member objects were used.

•An absolute is defined twice, with a different value in each definition.

•A header file declared and defined a variable. Possible solutions include:
-Declare the variable in .h: extern BOOL MyBool; and then assign to it in a .c or .cpp file: BOOL MyBool = FALSE;.
-Declare the variable static.
-Declare the variable selectany.

•If you use uuid.lib in combination with other .lib files that define GUIDs (for example, oledb.lib and adsiid.lib). For example:
Copyoledb.lib(oledb_i.obj) : error LNK2005: _IID_ITransactionObject
already defined in uuid.lib(go7.obj)

To fix, add /FORCE:MULTIPLE to the linker command line options, and make sure that uuid.lib is the first library referenced.
 
Share this answer
 
Comments
[no name] 4-Mar-11 4:12am    
Did you advise me to recompile MFC?
LaxmikantYadav 10-Mar-11 23:19pm    
No, I am just telling you possible reasons of this error and It may help you to solve your problem.
Thats no error:
1) place the include path of directx on top of the list of include paths.
2) do the same with the lib path for directx
Regards.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900