Re: Suggestion for using CStringArray with Unicode, mulit-byte, AT

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Leo,

I've tried that and even "excluded" some libraries which cased even more
issues.
Any other ideas?

"Leo Violette" wrote:

I would say you are mixing libraries. Perhaps you are linking in a project
..lib file that is using the static version of MFC while your dll project is
using the dynamic version of MFC?

Compare the project properties on all your projects that go into your DLL
(the lib projects).

"Gary A" <GaryA@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:63B8F4E7-18BA-4E1D-866D-F0BF2A08935F@xxxxxxxxxxxxxxxx
Hi,
I couldn't find the "development" group so i chose this one.
I am trying to bring some code that has the CStringArray in it from a
Multi-Byte project into a Unicode project and I keep getting errors I
cannot
resolve.
Scenario:
Project type: DLL
Use MCF: Shared DLL
Use ATL: Not using ATL
Min CRT Use in ATL: No
Char set: Unicode

added afxcoll.h to stdafx.h as suggested elsewhere
#include <afxcoll.h>
#include "resource.h"
#include <atlbase.h>
#include <atlcom.h>

I get the following error;

Error 247 error LNK2005: _DllMain@12 already defined in TestProj.obj
mfcs80u.lib

How do I fix this? I have been looking for days and everything I try, from
creating a wrapper, to adding header files, changing character sets, ALT,
MFC, and all kinds of other hoops. I'm about ready to scream real loud -
which would probably get me in trouble.

Can anyone please help me? Thanks in advance for your assistance. It is
greatl appreciated.

Regards,
Gary A





.



Relevant Pages

  • Re: COM dll resources
    ... resources named via strings - it requires numeric IDs. ... to both frameworks - ATL and MFC - and stored separately. ... This time I derived it from the MFC class CDialog ... >> Then add resource string to this DLL and have a method which loads this ...
    (microsoft.public.vc.atl)
  • Re: How to create TSP using Visual Studio 2003 or 2005
    ... I can only say that MS doesn't support it. ... You can use the ATL string and collection classes (which are shared ... between ATL and MFC) even without creating an ATL or MFC ... Our UI dll is a separate dll and ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Thread deadlock inside CString::AllocBuffer and sudden crashes
    ... The failure to call AFX_MANAGE_STATE for a non-extension DLL could have consequences, ... A thread that locks an object instance A and then ... ATL dll, "ATL using MFC" components, COM EXE servers, regular MFC dll, ...
    (microsoft.public.vc.mfc)
  • Re: Looking for information on creating a multithreaded com projec
    ... ATL is the preferred framework for developing COM server. ... Try it out using ATL project and by inserting a new ATL object. ... I am assuming that OP already had a MFC COM code and was merely migrating it to VS2005. ... I am assuming it was a Regular MFC DLL? ...
    (microsoft.public.vc.mfc)
  • Re: Suggestion for using CStringArray with Unicode, mulit-byte, ATL &
    ... ..lib file that is using the static version of MFC while your dll project is ... using the dynamic version of MFC? ... Compare the project properties on all your projects that go into your DLL ... Use ATL: Not using ATL ...
    (microsoft.public.vc.mfc)