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

2,542 views
Skip to first unread message

chromium_user

unread,
Jan 3, 2013, 9:26:10 AM1/3/13
to chromi...@chromium.org
Hi, when I compile chromium, compiler wrote this: LINK : fatal error LINK1104: cannot open file "atlthunk.lib" . If you know solution this problem, please answer me.
P.S. WindowsXP SP3, x32-bit, I am using VS2010 Express Editon.

Alex Pakhunov

unread,
Jan 3, 2013, 12:26:05 PM1/3/13
to vova.jam...@yandex.ru, chromium-dev
On Thu, Jan 3, 2013 at 6:26 AM, chromium_user <vova.jam...@yandex.ru> wrote:
Hi, when I compile chromium, compiler wrote this: LINK : fatal error LINK1104: cannot open file "atlthunk.lib" . If you know solution this problem, please answer me.
P.S. WindowsXP SP3, x32-bit, I am using VS2010 Express Editon.

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev



--
Alex.

chromium_user

unread,
Jan 4, 2013, 2:40:55 PM1/4/13
to chromi...@chromium.org
Hi, Alex. I  Installed WDK and  created a system-wide environment variable environment variable GYP_MSVS_VERSION=2010e ; I rebooted computer and tryed compile Chromium. But the mistake didn't disappear.

Alex Pakhunov

unread,
Jan 4, 2013, 3:47:11 PM1/4/13
to vova.jam...@yandex.ru, chromium-dev
You also need to re-run "gclient runhooks" to update project files generated from GYP.


On Fri, Jan 4, 2013 at 11:40 AM, chromium_user <vova.jam...@yandex.ru> wrote:
Hi, Alex. I  Installed WDK and  created a system-wide environment variable environment variable GYP_MSVS_VERSION=2010e ; I rebooted computer and tryed compile Chromium. But the mistake didn't disappear.

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev



--
Alex.

chromium_user

unread,
Jan 5, 2013, 2:22:36 AM1/5/13
to chromi...@chromium.org
Hello again, in Cygwin I wrote this: cd D:/trunk ; and wrote gclient runhooks --force. But  Chromium doesn't compile. What do you advise?









Vladimir.

Alex Pakhunov

unread,
Jan 7, 2013, 12:33:50 PM1/7/13
to vova.jam...@yandex.ru, chromium-dev
It is hard to say what is exactly wrong given the amount of information you have provided. I'm not even sure that you are still seeing LINK1104 error... Here is what I'd like to see:
  • What is WDK_DIR set to?
  • Values of all environment variables that start from GYP_.
  • What are the exact command you run to build Chrome.
Here are some investigation steps to consider:
  • Check that WDK_DIR environment variable is set correctly in you Cygwin environment. 
  • Check that the path specified by WDK_DIR is mentioned in the project files that GYP (AKA running gclient runhooks) generates.
  • You can try to delete src/out to make sure that project will be regenerated from scratch.
P.S. WindowsXP SP3, x32-bit, I am using VS2010 Express Editon.

I missed that earlier but this is not going to work. http://dev.chromium.org/developers/how-tos/build-instructions-windows mentions in the very beginning that you need Windows 7 x64 (and lots of RAM, i.e. 16GB or more) to build Chrome. You are going to hit all sort of issues trying to do it on 32bit XP box.


On Fri, Jan 4, 2013 at 11:22 PM, chromium_user <vova.jam...@yandex.ru> wrote:
Hello again, in Cygwin I wrote this: cd D:/trunk ; and wrote gclient runhooks --force. But  Chromium doesn't compile. What do you advise?









Vladimir.

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev



--
Alex.

chromium_user

unread,
Jan 8, 2013, 4:00:15 AM1/8/13
to chromi...@chromium.org
Hi, Alex. The answer to your questions:
1.In WDK_DIR set this:C:\WinDDK\7600.16385.1
2.Environment variable - GYP_DEFINES . Value - C:\Program Files\Windows Kits\8.0; environment variable - GYP_MSVS_VERSION. Value - 2010e . This is all variables.
3. I open projects in Visual Studio and click right button of mouse, press F7
4. Yes, WDK_DIR environment variable is set correctly in  Cygwin environment. 
Yes, the path specified by WDK_DIR is mentioned in the project files that GYP (AKA running gclient runhooks) generates. 

P.S. Unfortunately, I can not at this time go to Windows 7 and put the 64-bit processor. Sources nearly compiled. 

Peter Kasting

unread,
Jan 8, 2013, 4:03:38 AM1/8/13
to vova.jam...@yandex.ru, Chromium-dev
On Tue, Jan 8, 2013 at 1:00 AM, chromium_user <vova.jam...@yandex.ru> wrote:
2.Environment variable - GYP_DEFINES . Value - C:\Program Files\Windows Kits\8.0

That doesn't sound right, GYP_DEFINES is more of a "key = value" syntax.  What made you set it to this?

PK 

chromium_user

unread,
Jan 8, 2013, 5:35:07 AM1/8/13
to chromi...@chromium.org
Peter, I don't know. Initially I didn't set this variable. But when compiler wrote LINK : fatal error LINK1104: cannot open file "atlthunk.lib" , as a solution, I decided to add this variable - GYP_DEFINES.

Scott Graham

unread,
Jan 8, 2013, 11:48:30 AM1/8/13
to vova.jam...@yandex.ru, chromi...@chromium.org
I think you are setting GYP_DEFINES incorrectly. Please re-read step 3. It should be:

GYP_DEFINES=windows_sdk_path="C:\something\blah"


Perhaps using that tool would be less error-prone.

On Tue, Jan 8, 2013 at 2:35 AM, chromium_user <vova.jam...@yandex.ru> wrote:
Peter, I don't know. Initially I didn't set this variable. But when compiler wrote LINK : fatal error LINK1104: cannot open file "atlthunk.lib" , as a solution, I decided to add this variable - GYP_DEFINES.

Alex Pakhunov

unread,
Jan 8, 2013, 6:00:17 PM1/8/13
to vova.jam...@yandex.ru, chromium-dev
2.Environment variable - GYP_DEFINES . Value - C:\Program Files\Windows Kits\8.0; environment variable - GYP_MSVS_VERSION. Value - 2010e . This is all variables.

This is wrong as Peter and Scott have pointed out. Are you still seeing the "fatal error LNK1104: cannot open file 'atlthunk.lib" error or you are hitting something else?

You can try to enable detailed logging you that you can find the exact command line passed to link.exe. I don't know if it is possible for do it in Visual Studio. With msbuild you can do this (see "Build Chromium with MSBuild" at build instruction page):

msbuild.exe some.sln /p:Configuration=Debug /p:Platform=Win32 /m /consoleloggerparameters:verbosity=minimal /l:FileLogger,Microsoft.Build.Engine;logfile="debug.log";verbosity=detailed

Replace some.sln with the solution that you are using. debug.log will be large. Find the command line that is passed to link.exe so you can run it alone and see why it is failing. 

P.S. Unfortunately, I can not at this time go to Windows 7 and put the 64-bit processor. Sources nearly compiled. 

There is a very little incentive for people to debug non standard build configuration remotely. Basically if you are using non standard build environment you are own you own. 


On Tue, Jan 8, 2013 at 1:00 AM, chromium_user <vova.jam...@yandex.ru> wrote:

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev



--
Alex.

chromium_user

unread,
Jan 19, 2013, 1:17:51 AM1/19/13
to chromi...@chromium.org


Alex, I have to compile Chromium only on VS2010 Express.

Alex Pakhunov

unread,
Jan 21, 2013, 7:03:57 PM1/21/13
to vova.jam...@yandex.ru, chromium-dev

VS 2010 Express includes msbuild too.

Basically if you keep getting LNK1104 error about atlthunk.lib it means that the path to WDK is not added to libpath passed to the linker. Most likely it is caused by not following the steps on the "building on Windows" page precisely. Order of those steps is very important. Enabling detailed logging in msbuild is a one way of figuring out what the problem is.

Alex.

On Jan 18, 2013 10:17 PM, "chromium_user" <vova.jam...@yandex.ru> wrote:


Alex, I have to compile Chromium only on VS2010 Express.

--

Rostyslav Dzinko

unread,
Nov 21, 2013, 5:57:05 AM11/21/13
to chromi...@chromium.org
Hi.
Sorry for bringing up this "necro-topic", but the topic's issue appeared in my workspace.

I've been successfully building chromium for days, but the last update of depot_tools (when python276 was added) seems to break everything. The "altthunk.lib" is not found by linker, though all paths and env is configured.
Any suggestions, what might it be considering last updates?

P.S
The first issue I've encountered is that update have changed GYP_GENERATORS to 'ninja', while I've been using 'msvs'. So maybe another isses came up across after the update?

Вівторок, 22 січня 2013 р. 02:03:57 UTC+2 користувач Alex Pakhunov написав:

Rostyslav Dzinko

unread,
Nov 21, 2013, 6:01:45 AM11/21/13
to chromi...@chromium.org
Small update:

Sorry for misinforming you a bit.
The link error is "LNK1181" instead of "LNK1104" the topic-starter mentioned.

Четвер, 21 листопада 2013 р. 12:57:05 UTC+2 користувач Rostyslav Dzinko написав:

Rostyslav Dzinko

unread,
Nov 21, 2013, 7:17:29 AM11/21/13
to chromi...@chromium.org
Solved:

I have inspected linker settings, and environment variable wasn't really set globally (running env.bat sets it only for the actual shell). So setting WDK_DIR globally to the right directory did the job. So seems like the update have unset the variable, because everything worked fine previously.


Четвер, 21 листопада 2013 р. 13:01:45 UTC+2 користувач Rostyslav Dzinko написав:

Scott Graham

unread,
Nov 21, 2013, 12:40:34 PM11/21/13
to Rostyslav Dzinko, chromium-dev
env.bat generated tools/win/toolchain/toolchain.py doesn't change any global machine state, so yes, you need to run it in each new shell.


--

Rostyslav Dzinko

unread,
Nov 21, 2013, 1:33:24 PM11/21/13
to Scott Graham, chromium-dev
Thanks, Scott, I've got that by now.
Anyway, I've switched to ninja, and it works perfectly. As a mostly *nix user, command-line usage is much more preferred to me.


2013/11/21 Scott Graham <sco...@chromium.org>



--
Regards, Rostislav Dzinko

Fan Ping

unread,
Dec 4, 2013, 6:05:35 AM12/4/13
to chromi...@chromium.org
install windows driver kit, setup WDK_DIR enviroment varible,modify cpp.win32.property file.

在 2013年1月3日星期四UTC+8下午10时26分10秒,chromium_user写道:
Reply all
Reply to author
Forward
0 new messages