[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

error LNK2001: unresolved external symbol _GUID_SysKeyboard

Posted on 2004-10-15
5
Medium Priority
?
2,514 Views
Last Modified: 2007-11-27
I've been working on a large body of code over a period  of time and up to recently it has compiled and linked OK.  Then I tried to incorporate the "playwnd" example from the MSSDK DirectX8 and started getting linking errors.  I've gone over the Project Settings many times, but still have not come up with a solution.  I feel like I'm probably missing something very simple.  I'm using Visual C++ 6.0 with the Service Pack 2 installed.
Thanks, Norv

Build notes:
Compiling...
WF_engine.cpp
Linking...
WF_engine.obj : error LNK2001: unresolved external symbol _GUID_SysKeyboard
WF_engine.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7
WF_engine.obj : error LNK2001: unresolved external symbol _GUID_SysMouse
WF_engine.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A
WF_engine.obj : error LNK2001: unresolved external symbol _DirectSoundCreate@12
WF_engine.obj : error LNK2001: unresolved external symbol __imp__mmioAscend@12
WF_engine.obj : error LNK2001: unresolved external symbol __imp__mmioRead@12
WF_engine.obj : error LNK2001: unresolved external symbol __imp__mmioClose@8
WF_engine.obj : error LNK2001: unresolved external symbol __imp__mmioDescend@16
WF_engine.obj : error LNK2001: unresolved external symbol __imp__mmioOpenA@12
dinput.lib(dilib1.obj) : error LNK2001: unresolved external symbol _GUID_ZAxis
dinput.lib(dilib1.obj) : error LNK2001: unresolved external symbol _GUID_YAxis
dinput.lib(dilib1.obj) : error LNK2001: unresolved external symbol _GUID_XAxis
dinput.lib(dilib2.obj) : error LNK2001: unresolved external symbol _GUID_Key
Debug/Wildfire.exe : fatal error LNK1120: 14 unresolved externals
Error executing link.exe.

xxx.exe - 15 error(s), 0 warning(s)
0
Comment
Question by:NorvBrooks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 86

Assisted Solution

by:jkr
jkr earned 225 total points
ID: 12321402
You need to add

#ifndef INITGUID
#define INITGUID
#endif
#include <initguid.h>
#include <objbase.h>

to *one* of your .cpp filed in order to pull in the GUIDs. Additionally, you need to link with dsound.lib and Winmm.lib
0
 

Accepted Solution

by:
spines11 earned 150 total points
ID: 12321579
In your project settings, set your project to link with the dxguid.lib library.
0
 

Author Comment

by:NorvBrooks
ID: 12328786
Both jkr & spines11 answers appear to help.  For the record the order of the #include headers matter.  The <objbase.h> needs to come before <initguid.h>.  Also, I needed to remove from my Link listing in the Project Settings "Strmiids.lib" which you would not have had a way of knowing about.  I still get the following two linking errors:

Linking...
playwnd.obj : error LNK2001: unresolved external symbol _IID_IMediaSeeking
playwnd.obj : error LNK2001: unresolved external symbol _IID_IGraphBuilder
Debug/Wildfire.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

xxx.exe - 3 error(s), 0 warning(s)

Thanks,
Norv
0
 
LVL 86

Expert Comment

by:jkr
ID: 12360802
Have you tried adding the other libs, e.g. strmiids.lib?
0
 

Author Comment

by:NorvBrooks
ID: 12366087
Thanks jkr for your additional comments.  I did get the application to link OK.  I had to make sure that "quartz.lib strmbase.lib" were listed first in the Project Settings - Link tab.  Also, I had to go into Tools > Options > Directories and add C:\mssdk\samples\Multimedia\DirectShow\BaseClasses.

Once again, Thanks
Norv
0

Featured Post

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.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

656 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