Solved

LINK : fatal error LNK1104: cannot open file 'dplayx.lib', when trying to compile Dark GDK

Posted on 2008-11-01
8
1,742 Views
Last Modified: 2013-12-14
Hello experts :-)

I am Visual C++ newbie.

I am trying to build and run sample projects provided with Visual C++ 2008 express edition but get such an error:

LINK : fatal error LNK1104: cannot open file 'dplayx.lib'

I have this file in two locations on my computer:

D:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x64
D:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x86

Question:

how do I guide VC++ to find/ open this file?
And which one to choose?

Thank u

panJames
0
Comment
Question by:panJames
[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
  • 4
  • 3
8 Comments
 
LVL 9

Expert Comment

by:mgonullu
ID: 22856991
Did you set the path of the library directory to your project setting?
0
 

Author Comment

by:panJames
ID: 22857402
How can I do it?

panJames
0
 
LVL 9

Expert Comment

by:mgonullu
ID: 22857478
http://msdn.microsoft.com/en-us/library/wkze6zky(VS.80).aspx

Right click on Solution, then click on References then add the path
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:panJames
ID: 22857527
I did add my path into:

<right click> References -> Framework and References -> Add Path

D:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x86

but it didn't help and I still get the same error message:

------ Build started: Project: Dark Dungeon, Configuration: Release Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 'dplayx.lib'
Build log was saved at "file://d:\Program Files\The Game Creators\Dark GDK\Samples\Visual Studio 9\Dark Dungeon\Release\BuildLog.htm"
Dark Dungeon - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


panJames
0
 
LVL 9

Expert Comment

by:mgonullu
ID: 22857556
can you see the file in the Game directory?
if not install it from here:http://www.cubic.org/player/doc/node69.htm


Also see this
0
 

Author Comment

by:panJames
ID: 22857649
I copied dplayx.lib to Game folder, now it compiles (why do I need to copy lib files into the Game folder anyway?). Now I get a bunch of other error messages:

------ Build started: Project: Dark Dungeon, Configuration: Release Win32 ------
Linking...
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _DPSPGUID_TCPIP referenced in function "public: int __thiscall CNetwork::SetNetConnections(int)" (?SetNetConnections@CNetwork@@QAEHH@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _DPSPGUID_IPX referenced in function "public: int __thiscall CNetwork::SetNetConnections(int)" (?SetNetConnections@CNetwork@@QAEHH@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _CLSID_DirectPlay referenced in function "private: static int __stdcall CNetwork::StaticGetConnection(struct _GUID const *,void *,unsigned long,struct DPNAME const *,unsigned long,void *)" (?StaticGetConnection@CNetwork@@CGHPBU_GUID@@PAXKPBUDPNAME@@K1@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _IID_IDirectPlay4A referenced in function "private: static int __stdcall CNetwork::StaticGetConnection(struct _GUID const *,void *,unsigned long,struct DPNAME const *,unsigned long,void *)" (?StaticGetConnection@CNetwork@@CGHPBU_GUID@@PAXKPBUDPNAME@@K1@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _DPAID_ComPort referenced in function "public: int __thiscall CNetwork::FindNetSessions(char *)" (?FindNetSessions@CNetwork@@QAEHPAD@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _DPSPGUID_SERIAL referenced in function "public: int __thiscall CNetwork::FindNetSessions(char *)" (?FindNetSessions@CNetwork@@QAEHPAD@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _DPAID_Phone referenced in function "public: int __thiscall CNetwork::FindNetSessions(char *)" (?FindNetSessions@CNetwork@@QAEHPAD@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _DPSPGUID_MODEM referenced in function "public: int __thiscall CNetwork::FindNetSessions(char *)" (?FindNetSessions@CNetwork@@QAEHPAD@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _DPAID_INet referenced in function "public: int __thiscall CNetwork::FindNetSessions(char *)" (?FindNetSessions@CNetwork@@QAEHPAD@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _DPAID_ServiceProvider referenced in function "public: int __thiscall CNetwork::FindNetSessions(char *)" (?FindNetSessions@CNetwork@@QAEHPAD@Z)
multiplayer.lib(CNetwork.obj) : error LNK2019: unresolved external symbol _IID_IDirectPlayLobby2A referenced in function "public: int __thiscall CNetwork::FindNetSessions(char *)" (?FindNetSessions@CNetwork@@QAEHPAD@Z)
.\Release/Dark Dungeon.exe : fatal error LNK1120: 11 unresolved externals
Build log was saved at "file://d:\Program Files\The Game Creators\Dark GDK\Samples\Visual Studio 9\Dark Dungeon\Release\BuildLog.htm"
Dark Dungeon - 12 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


panJames
0
 
LVL 9

Accepted Solution

by:
mgonullu earned 450 total points
ID: 22858074
0
 
LVL 1

Assisted Solution

by:suryaxchange
suryaxchange earned 50 total points
ID: 22865035
Let me tell you some basics regarding the libraries:

When a code is using any library, the library need to be in the current directory where the created executable will be residing when compiling the code or set the environment variable to add the path where the library is residing.

Or specify the path in the visual studio environment.In visual studio application

GoTo Project Menu->Properties option

Here select linker option in the left tree view. In the right list control you have a option by name additional library directories there you can specify absolute/relative path where the library is residing.

If the specified library still uses any further additional libraries then even those libraries paths need to specified. I think in your case I see the same problem.

-Surya
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to gracefully close the c++ 11 thread? 3 160
Syntax Error 2 115
Adding items to a C# list incrementally 5 82
why doesn't assert terminate here? 2 18
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

738 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