Re: PB 5.0: SDK missing ATL?
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Tue, 28 Aug 2007 13:02:52 -0700
As I said, the mere fact that you have the headers does *NOT* indicate that
you are using them correctly. Since you were able to *compile* your source
code, that IID value was *declared* in one of the header files that you
included. However, it was declared 'extern', and the linker can't find the
actual definition. It's the difference between:
extern GUID IID_ISupportErrorInfo;
and
GUID IID_ISupportErrorInfo = { whatever the guid is };
You understand that? Most header files that declare GUIDs have some means
to cause the definition, rather than the declaration, to appear. You
obviously can't do this for every source file that includes that header or
you'd have a problem with the same variable being *multiply* defined. It
might look something like this:
#ifdef INIT_ISUPPORTINFOGUIDS
GUID IID_ISupportErrorInfo = { whatever the guid is };
#else
extern GUID IID_ISupportErrorInfo;
#endif
So, in order to get that variable *defined*, you'd need, in *one* of your
source files, to include the header file something like this:
#define INIT_ISUPPORTINFOGUIDS
#include <isupportinfo.h>
while, in the other files that need to know about the variable, but aren't
going to be responsible for *defining* it, you'd just do this:
#include <isupportinfo.h>
That's why I suggested that you look at the declaration for IID_ISupportInfo
in the header file where it's declared and see if it's using this pattern.
If so, you know what you need to do. If not, there must be a library
somewhere the you have to link with. I'm betting on the former, but could
be wrong.
Paul T.
"Craig" <Craig@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6D65A44E-8C50-4AD7-BA55-E908560B075C@xxxxxxxxxxxxxxxx
Hi Paul,
Thank you for responding to my question. I am not having any trouble with
the header files ... only linking my DLL to the ATL library.
My error message is:
"error LNK2001: unresolved external symbol IID_ISupportErrorInfo"
and others IID_ symbols related to ATL.
When I look in my SDK's Lib\ARMV4I folder I can see the file:
"atlce400.lib".
What else does it need?
"Paul G. Tobey [eMVP]" wrote:
First search for the item in the headers of your SDK. Most likely is
that
you need to define some preprocessor symbol to cause the variable to
actually be *defined* and not just declared. You might check the project
settings for the other project, look for any preprocessor defines set in
the
source code of modules in that project before including ATL files, etc.
Paul T.
"Craig" <Craig@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DE1EC80C-74B9-496E-884A-8C579D4F1B4C@xxxxxxxxxxxxxxxx
Hello,
I am trying to build an SDK for my platform that supports ATL.
However,
whenever I use my SDK that "should" support ATL (box checked in SDK or
SYSGEN_ATL selected in platform), my DLL has linking complaints (cannot
find
IID_ISupportInfo , etc.). This works with another SDK that we got from
a
vendor (so I know it isn't my project settings).
I can remember a post somewhere regarding this issue, but when
searching I
cannot find it. If someone knows of a fix to this problem or of the
post
showing the fix, please reply.
Your help is greatly appreciated.
Craig
.
- Follow-Ups:
- Re: PB 5.0: SDK missing ATL?
- From: Paul G. Tobey [eMVP]
- Re: PB 5.0: SDK missing ATL?
- References:
- Re: PB 5.0: SDK missing ATL?
- From: Paul G. Tobey [eMVP]
- Re: PB 5.0: SDK missing ATL?
- Prev by Date: Re: WinCE 5.0/6.0 self paced training
- Next by Date: Bug in CE5/WPA2 QFE? Or in WZCTool?
- Previous by thread: Re: PB 5.0: SDK missing ATL?
- Next by thread: Re: PB 5.0: SDK missing ATL?
- Index(es):
Relevant Pages
|