Migration to VC7: CString problem

R

Ram Baruch

Hi,
In my company we're trying to migrate our application
from vc6 to vc7.
in one of our dlls we define the following class:

class __declspec (dllexport) CExString : public CString
{
....
}



and everything is ok until one of our functions, for
example:

void ExportCExStringFunc(CExString& someStr)
{
....
}

is EXPORTED from the dll.

The linker doesn't accept this and we get tons of errors
in the project that IMPORTS this function.

When I changed the class to something like:
class __declspec (dllexport) CExString
{
CString mStr;
}

it was ok, but then, of course, I have differnt problems
and it is not exactly what I wanted.


Does anyone knows something about it?
Thanks,
Ram.
 
B

Brett Keown [MSFT]

Hi Ram,

Thanks for posting to the Microsoft Newsgroups! I just wanted to take a
moment to let you know that while I am not a VC++ Support person, I have
asked the team about your specific issue and was referred to this article
to assist you:

PRB: Linking Errors When You Import CString-Derived Classes
ID: 309801

http://support.microsoft.com/default.aspx?scid=KB;EN-US;309801

Please let me know if this helps to resolve your issue or if you need any
follow-up help.

Brett Keown
Microsoft Support
(e-mail address removed)

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top