While trying to convert com projects from VC6.0, I get:
LINK : fatal error LNK1104: cannot open file 'atlthunk.lib'
This is from atlbase.h . There is no way I can just comment out the #include for that, as some lucky programmer here said he did. It causes many projects to err out.
Is there any way to get around this linkage error something like "#pragma error disable: 1104)" (wild stab in the dark here)
Note that atlthunk.lib was not on my vc6 system, and apparently on anyone elses either. Short of modifying atlbase.h, I don't know what to do, unless maybe create a dummy lib and rename it and stick it in the lib search path.
I have 233 projects that depend on atlbase.h

atlbase.h
Jolting
You are not wrong with this! VCEE does not support ATL (and MFC).
ATL is a sofware asset which has been developed and owned by Microsoft.
VCEE allows us to play with pure C/C++ based programming. ATL is a class hierarchy. It's their asset!
Hope this helps.
xihong
JonSpa3, I agree, this is the cleanest solution I've seen yet for properly using ATL from the Platform SDK with Visual C++ 2005 Express.
Ted.
mkincaid
in the Platform SDK tree, using VC Express edition,
and I get errors regarding atlbase.h, such as:
Yes, I have installed on my E: drive on paths with shorter names; so if I have to repartition my C: drive to make room for the default installation paths, I guess I can do that, but I hope there's a more intelligent way ...
e:\program files\mspsdk\samples\multimedia\directshow\capture\playcap\playcap.cpp(12) : fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory
Part of my confusion comes from the fact that I find two distinct "atlbase.h" files in my installation tree, one in ...\Include\atl, and the other at ...\src\mfc -- why are there two, and which one is right
Lastly, something makes me think I wouldn't be asking this question, wouldn't be getting the C1083 errors, if my environment variables were right;
@ECHO OFF
REM vcvars32.bat not found
SET MSVCVer=8.0
But it's right there, where I put it!
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
Copyright (C) Microsoft Corporation. All rights reserved.
MT /EHsc /Fo"XP32_RETAIL\\" /Fd"XP32_RETAIL\\" /I..\..\BaseClasses /I"\Include" playcap.cpp
playcap.cpp
playcap.cpp(12) : fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory
NMAKE : fatal error U1077: '"E:\Program Files\VS2005\VC\BIN\cl.EXE"' : return code '0x2'
Stop
PareshSoft
Xtramalt
YOu are using VC 6.0. This forum handles questions about Visual C++ Express. Express doesn't contain ATL so this question is of topic here.
Try the usegroups here:
http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vc.atl&lang=en&cr=US
My guess is that you installation if defect. Check the original CDs for a LIB file with this name!
Surender Reddy
1. Set the following linker option in your project:
/NODEFAULTLIB:"atlthunk"
2. Add the following to your stdafx.c:
namespace ATL {
void * __stdcall __AllocStdCallThunk()
{
return HeapAlloc(GetProcessHeap(),
0, sizeof(_stdcallthunk));
}
void __stdcall __FreeStdCallThunk(void *p)
{
HeapFree(GetProcessHeap(), 0, p);
}
}
This duplicates the method of allocating and freeing stdcall thunks that is used for the other platforms, as shown in atlbase.h.
This also avoids modifying atlbase.h which is a dangerous business.
In my particular application, only one window is created for the life of the object, so efficiency or heap fragmentation is not an issue.
Hope this helps,
-jws