Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » NuGet Package Manager Allegro 5 linker error

This thread is locked; no one can reply to it. rss feed Print
NuGet Package Manager Allegro 5 linker error
Matias Persson
Member #15,093
May 2013

Hi, recently I installed MSVC2017 on a frech install of Windows 10, and I do like I've always done.
Create a new project, then go to Tools -> NuGet Package Manager -> Install-Package Allegro -Version 5.2.5.1

By this stage, I'm normally set to just program using Allegro 5, and whenever I need addons such as images addon or primitives, I'd go to project settings and go to the Allegro 5 tab and turn them on.

But with just a simple hello world file and no allegro 5 code in the new program yet, I cannot even compile without getting this weird linker error:

#SelectExpand
11>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(719,5): error MSB6006: "link.exe" exited with code 1104. 21>LINK : fatal error LNK1104: cannot open file 'allegro.lib'

So I figure that I'll go to project settings -> linker -> and put 'allegro.lib' in input additional dependencies settings. No luck.
Anyone knows what is wrong here ?????? Any help is appreciated :)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Matias Persson
Member #15,093
May 2013

Stupid me, I noticed. I was just hoping for a reply so I could close this thead. (Couldn't find any edit title button and I could not reply to my own reply...)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

No matter it helps that you have made us aware of the new version 😉

Also you can't close threads but they will lock on their own after a week. And you can only send to top you cannot reply to your own post. But you can edit them all you want.

SiegeLord
Member #7,827
October 2006
avatar

You can install and select the v141 toolchain, and that'll work in 2019 with the current packages. v142 packages are coming soon.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Matias Persson
Member #15,093
May 2013

Oh so I uninstalled 2019 for nothing then :P Well good to know, I'll keep that in mind next time my computer breaks down and I have to format the harddrive (after backing up of course)

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

CmdrGreenwood
Member #17,068
April 2019

Hi. Same problem here, can't compile under VS2019.
@SiegeLord: How can I select the v141 toolchain? Can't find a setting in VS.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

CmdrGreenwood
Member #17,068
April 2019

I tried. In my VS2019 (Project - Properties - General - Toolset) no VS2017 option ist available, only 2019. So I installed the VS2017 buildtools. Now I can select VS2017 in my project, but when doing so, I get 49 different error messages about missing sourced and "al_init()" ist underlined red. ???

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

SiegeLord
Member #7,827
October 2006
avatar

Just uploaded the v142-compatible package. Look for the version 5.2.5.2. FWIW, v141 worked okay for me in MSVC 2019, I just had to also select an older Windows SDK version (8.1). Either way, that shouldn't be necessary now.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

CmdrGreenwood
Member #17,068
April 2019

You did it! Thanks! Everything is working now... :D

Go to: