Solved

Link Problem

Posted on 2006-11-04
7
845 Views
Last Modified: 2007-12-19
What library file do I need to add?


BandToolBarCtrl.obj : error LNK2001: unresolved external symbol _IID_IHTMLWindow3
BandToolBarCtrl.obj : error LNK2001: unresolved external symbol _IID_IHTMLDocument3
ScriptedFrame.obj : error LNK2001: unresolved external symbol _IID_IActiveScriptParse32
ToolBand.obj : error LNK2001: unresolved external symbol _DIID_HTMLWindowEvents2
ToolBandObj.obj : error LNK2001: unresolved external symbol _DIID_HTMLWindowEvents2
ToolBandObj.obj : error LNK2001: unresolved external symbol _CLSID_ToolbarExtButtons
R/toolbar.dll : fatal error LNK1120: 5 unresolved externals
0
Comment
Question by:BrianGEFF719
  • 3
  • 3
7 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 17876736
You need to use

#define INITGUID
#include <initguid.h>
#include <shlguid.h>

in *one* of your source files so that the

DEFINE_GUID(CLSID_ToolbarExtButtons, 0x2ce4b5d8, 0xa28f, 0x11d2, 0x86, 0xc5, 0x0, 0xc0, 0x4f, 0x8e, 0xea, 0x99);

(for example) in 'shlguid.h' will expand to a definition at not only a declaration and the linker can use it for linking.
0
 
LVL 19

Author Comment

by:BrianGEFF719
ID: 17877201
jkr: Same link problems...
0
 
LVL 86

Expert Comment

by:jkr
ID: 17877259
Are you also linking with 'guids.lib'?
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 86

Expert Comment

by:jkr
ID: 17877270
Sorry, 'uuid.lib'.
0
 
LVL 19

Author Comment

by:BrianGEFF719
ID: 17877287
Yes, using uuid.lib.
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 17889538
>>>> 'shlguid.h' will expand to a definition at not only a declaration and the linker can use it for linking.

if the cpp file where you set #define INITGUID  uses precompiled header (PCH) via stdafx.h the INITGUID might be ignored or the header file wouldn't be included cause it is already included by stdafx.h.

To fix that  you should add a new cpp file to your project that contains nothing but

#define INITGUID
#include <initguid.h>
#include <shlguid.h>

as jkr has explained above. To get it compiled you have to right-click the new cpp file in the project (or solution) tree and switch off PCH in the C++ tab of the settings (properties) for that file.

Regards, Alex
0
 
LVL 19

Author Comment

by:BrianGEFF719
ID: 17896013
This problem has been resolved. The original author of the code forgot to send me a folder of headers and library files. Which fixed the problem.


Brian
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now