Skip to main content
GameDev.net gamedev.net
🔒 Locked

linker error with atlbase "atlhunk.lib" instead of "atlthunk.lib"

Started by ender012345 Mar 12, 2008 at 6:28 AM 0 replies 3.8k views
Original Post
ender012345
ender012345
I'm having a similar problem to the one posted at http://www.gamedev.net/community/forums/topic.asp?topic_id=474527&whichpage=1� however, I'm getting a slightly different error with a file name that doesn't even show up on a search of gamedev.net. I'm using VC++ 2008 Express edition and the Microsoft Platform SDK for Windows Server 2003 R2. I'm trying to run an example program from directxtutorial.com. I'm getting this linker error when I try to use atlbase.h. 1>LINK : fatal error LNK1104: cannot open file 'atlhunk.lib' In the previous post, someone was getting the same error except that the file was atlthunk.lib. Also, I don't understand the solution to the problem found in that post. "Edit your altbase.h there is #pragma comment directive, that queries for atlthunk.lib - comment this." <-- no idea what that means. Any help is appreciated. Thank you.
Zahlman
Zahlman
Quote:
Original post by ender012345
"Edit your altbase.h there is #pragma comment directive, that queries for atlthunk.lib - comment this." <-- no idea what that means. Any help is appreciated. Thank you.


"your altbase.h" means a file in the project, or your include directories, called altbase.h. "Edit" means modify with a text editor. (But "altbase.h" is presumably a typo; surely that should be "atlbase.h".)

"(a) #pragma (comment) directive" is a line of the file that starts with #pragma. This is a command for the C++ preprocessor.

"queries for" means checks to see if it exists. You don't really need to know how the pragma directives work; just find the one that mentions atlthunk.lib.

"comment this (out)" means put a comment marker (//) at the beginning of the line, so that it is ignored by the compiler and preprocessor. The net effect is to disable the pragma, i.e. to not query for the .lib file.

Any further explanation required?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.