Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Link Problem

Posted on 2006-11-04
7
Medium Priority
?
876 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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

916 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