From: Nhat Dung on
Hello,
I'm trying to do some COM object with ATL.
http://www.codeproject.com/KB/shell/copypathext.aspx

When build for x86, there are no error.
But when I build for x64 there are error tell me that atls.lib not found
"LINK : fatal error LNK1104: cannot open file 'atlsd.lib'"
I think it because there no atls.lib for x64, then I look in to atl source I
think I must build ATL for Platform AMD64

"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\src"
The readme.txt say this :
atlmfc.mak can be used to rebuild all ATL and MFC libraries and DLLs.
Following is the command line you can specify with NMAKE

nmake /f atlmfc.mak [ALL | ATL | MFC] [CLEAN= ] [LIBNAME= ] [PLATFORM= ]

this is what I do to rebuild atl source for x64
=================================================
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>vcvars32.bat
Setting environment for using Microsoft Visual Studio 2008 x86 tools.

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\src>nmake /f
atlmfc.mak ATL PLATFORM=AMD64

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

cd atl
"C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\nmake.exe" /
/f atlidl.mak DEBUG=0 _OD_EXT= PLATFORM=AMD64

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

cd ..
if not exist ..\lib\AMD64 md ..\lib\AMD64
cd atl\atls
"C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\nmake.exe" /
/f atls.mak DEBUG=0 _OD_EXT= UNICODE= PLATFORM=AMD64

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1073: don't know how to make
'AMD64\Release\QIThunk.obj'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
9.0\
VC\BIN\nmake.exe"' : return code '0x2'
Stop.

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\src>"
====================================================

Can anyone tell me how to build that ?
Thanks!