471,123 Members | 897 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,123 software developers and data experts.

Using MFC and CLR in DLL

Hello,

I've created a regular (as opposed to extension) DLL that has MFC support
(in a shared DLL). Everything works fine. I then decided to modify my
configuration so that on the project level I turned on CLR support. Now,
when I try to rebuild my solution I get linker errors

fileName.obj : error LNK2028: unresolved token (0A000ACF) "void __stdcall
_com_issue_error(long)" (?_com_issue_error@@$$FYGXJ@Z) referenced in function
"void __cdecl _com_util::CheckError(long)" (?CheckError@_com_util@@$$FYAXJ@Z)
fileName.obj : error LNK2019: unresolved external symbol "void __stdcall
_com_issue_error(long)" (?_com_issue_error@@$$FYGXJ@Z) referenced in function
"void __cdecl _com_util::CheckError(long)" (?CheckError@_com_util@@$$FYAXJ@Z)

Is having MFC in the DLL plus CLR support at the project level something
that should work? If so, anything you can suggest to help resolve my
compilation problem?

Thanks,
Notre
Sep 27 '06 #1
9 5166
Fixed it by adding:

#include <comdef.h>

to my cpp file.
Sep 27 '06 #2
This fixed my linking errors, now I have two warnings:

mfcm80ud.lib(postrawdllmain.obj) : warning LNK4099: PDB 'mfcm80ud.i386.pdb'
was not found with 'E:\Program Files\Microsoft Visual Studio
8\VC\atlmfc\lib\mfcm80ud.lib' or at
'c:\wc\0008\src\rn1relationvs\debug\mfcm80ud.i386. pdb'; linking object as if
no debug info
mfcm80ud.lib(postdllmain.obj) : warning LNK4099: PDB 'mfcm80ud.i386.pdb' was
not found with 'E:\Program Files\Microsoft Visual Studio
8\VC\atlmfc\lib\mfcm80ud.lib' or at
'c:\wc\0008\src\rn1relationvs\debug\mfcm80ud.i386. pdb'; linking object as if
no debug info

Any suggestions?

Thanks!
Sep 27 '06 #3
Hi Notre,

The mfcm80ud.i386.pdb is a debug symbol file to the mfcm80ud.dll (MFC
Managed Library - Debug Version). It used to be in the
..\Windows\Systems\Symbols\dll folder. If you do a File Search, can you
find it?

By the way, it would bot be a problem to build your application if that
debug symbol file is absent.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 28 '06 #4
Hi Gary,

I found it in c:\windows\smybols\dll. How do I get that recognized in my
build? I'm using VS 2005.

I know I can build my application w/o it, but I probably will have problems
debugging into the MFC code, right?

Notre
Sep 28 '06 #5
Hi Notre,

I suggest you can add that diretory into the VS2005's symbol path:

Options | Debugging | Symbols
Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 29 '06 #6
I tried that (actually, Tools | Option | Debugging) but it didn't make a
difference.
Oct 2 '06 #7
Hi Notre,

"Notre Poubelle" <no************@online.nospamwrote in message
news:E0**********************************@microsof t.com...
>I tried that (actually, Tools | Option | Debugging) but it didn't make a
difference.
Did you get the linker error again? That is a different thing: the above
option specifies the directory for a debug session. Set a breakoint, start
your debug build in the IDE and let it hit the breakpoint.

See if you can find the symbol status for the mfc80: either search the
output window where you should see every loaded module and the information
if symbol files where loaded or execute this command from VC's Command
Window: Debug.ListModules. The text ouput has one column which indicates uf
symbols were loaded. You will find one line for each loaded module.

When you added the symbol directory at the above config menu you should see
that the mfc pdbs have been found. If not, they do not seem to match the
dlls.

--
SvenC
Oct 2 '06 #8
Hi Notre,

I suggest you can also try to copy that .pdb file(in the system32 folder)
to the ..\Microsoft Visual Studio 8\VC\atlmfc\lib directory.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 5 '06 #9
That did it!

Thanks,
Notre
Oct 10 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Enos Meroka | last post: by
3 posts views Thread by Mike L | last post: by
3 posts views Thread by xzzy | last post: by
14 posts views Thread by pmud | last post: by
8 posts views Thread by acb | last post: by
reply views Thread by Metal2You | last post: by
reply views Thread by Eugene Anthony | last post: by
6 posts views Thread by =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.