Cannot Open File atls.lib - linker

I have atls.lib in my hard drive, but I can't link it into my Visual Studio project. I know that atls.lib is an ATL specific library file, and I have all the ATL files/headers/libraries. However, I still can't link them.
LINK : fatal error LNK1104: cannot open file 'atls.lib'
Can anyone help a helpless programmer?
Thank you very much.

Fixed for me by installing the following Individual Component through the Visual Studio Installer:
C++ ATL for latest v142 build tools with Spectre Mitigations (x86 & x64)
I'm running a 32 bit C# project using VS2019.

In my case the problem was missing ATL/MFC libraries for x64, I had to add them in the Visual Studio installer (it was an open source project, so I wasn't aware of the requirement).
Once again, the invaluable procmon did the job:
While atls.lib was found under $(VCInstallDir)atlmfc\lib the linker looked in $(VCInstallDir)atlmfc\lib\amd64.

Just to keep this question updated, I encountered this error after running the install for Spectre, the VC++ spec code mitigation tool. After looking at the VC++ directories, I noticed that both the Include Directories and the Library Directories have changed to add a "Spectre" addition to the path, while the original path to the actual file is no longer there. I will update this later after I figure out whether Spectre didn't install correctly, or if simply changing the path will solve the issue; I do NOT want the speculative attack exposed in my code, which apparently happens with ATL code.
EDIT
My compiler is VS 2017 Community Edition.
EDIT
The solution that worked for me is here, discovered by Holger Schmeken

It seems that the library directory has not been added. In Project Properties, Linker, General options, add the directory where atls.lib resides to the Additional Library Directories field.

I added <Visual Studio folder\VC\Tools\MSVC\14.15.26726\atlmfc\lib\x64\atls.lib> to the Linker>Input> Additional Dependencies in solution properties and it got resolved.

This issue started happening to me after a recent VS2019 update I got. I noticed that it was because Spectre Mitigation had been automatically enabled but I didn't have the Spectre Mitigation version of the library.
Installing the Spectre Mitigation version, or disabling Spectre Mitigation are both possible fixes.

I have soloved this problem by just copying this file to my project folder.

Related

The build tools for Intel C++ Compiler 17.0 (Platform Toolset = 'Intel C++ Compiler 17.0') cannot be found

I have a C code (pretty old one) that I tried to run in VS17 and am getting this error:
The build tools for Intel C++ Compiler 17.0 (Platform Toolset = 'Intel C++ Compiler 17.0') cannot be found. To build using the Intel C++ Compiler 17.0 build tools, please install Intel C++ Compiler 17.0 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
I am not including the code as it is old and big.
Can someone please suggest what the problem is?
It means your project configuration was done with an old version of Visual Studio.
I suggest you follow the VS suggestion: at the solution pane, right click on the project/solution and select 'retarget solution'. This will change your solution/project configuration to the current visual studio you use (2017).
As the project/solution files will be overwritten by the 'retarget' process, it worth copying the solution/project files (or even the entire solution
directory) before starting the 'retarget solution' process, so you can revert to the previous state for troubleshooting etc.
An example:
I'm want to build an old version of librdkafka, which was originally built with VS2010, and I want to use VS2017.
when looking at the solution explorer pane, you can see all projects has "(Visual Studio 2010)" title near them, at the left side of each project name.
Now I right click on the solution, and select 'Retarget solution':
At the dialog box, you get, click OK, and that's it.

Visual Studio 2010 err# U1095, NMAKE

I'm writing a program in C using Visual Studio 2010, and I am getting the following error:
U1095: expanded command line '(here come includes-includes-includes)'.
Some of my colleagues get the same error while others do not. The only easy feasible solution I've tried is to update NMAKE itself from a shady website (NMAKE is very hard to find).
Erasing include entries helps, but eventually we hit the limit again. One hack that works is to use all the includes in a single file per Microsoft's offering and read from that file but I'd prefer to not have to do that.
Is there an official way to update nmake without installing the Windows SDK or Visual Studio 2015?
I would not recommend using anything in programming in general that you "downloaded from a shady source". That sounds like a good way to embed viruses in your shipped code unknowingly. There is no nmake standalone, so you will be forced to use the one that ships with Visual Studio.
Some things you could try:
Attempt using 32-bit and 64-bit versions of nmake and see if you get different results.
Get a more recent version of Visual Studio and see if it works better there.
Thanks a lot for your responses, guys.
Manipulations with nmake didn't help at all.
The answer is: to completely erase a sandbox and get a clean one. So it wasn't MS-VS-2010 problem standalone, but a combination of problems between MS-VS and MKS/PTC Integrity.

invalid configuration file in turbo c when using project

I'm trying to use my project file in c, but it wont let me do it, it gives invalid configuration file then shows the directory of my project file.
I am using Turbo C simulator for windows 7 64 bit
I already tried to re install it but same error keeps happening, i can run normal files though just cant include my project file.
Do yourself a favor and install some worthy compiler. There are alot of options available on the market. I prefer Microsoft Visual Studio.
Some free worthy compilers:
Microsoft Visual Studio Express
Code Blocks
Eclipse
Turbo C is a old version any way you want a solution how to create a project file without error see this video:
https://www.youtube.com/watch?v=KAdlaYclkvg
It may help you, follow each and every step carefully it's better not to use turbo c++. use dev c++ or code blocks for better management of project files.

How can I determine an application's software prerequisites?

I'm developing a small WinForms program for home use - I have no intentions to releasing it anywhere.
Running it on my development machine, where I have Visual Studio and .NET and whatever else installed, works but deploying it on my PC, where I might not have all those frameworks, doesn't. I'm using some library written in C++ so I'm assuming I'm going to need some version of Visual C++ Redistributable, but I'm not sure which? And I'm not sure if that would be all. So, how can I determine an application's software prerequisites?
I used Dependency Walker and I got a message IEHIMS.DLL - Error opening file. The system cannot find the file specified (2), but that's all I could make out; there is so much information I'm having trouble make sense of it all. Besides, according to a quick google, IESHIMS.DLL has something to do with Internet Explorer, so it shouldn't really matter.
Thanks in advance to anyone taking to the time to consider my question.
Kind regards
For framework you can set the prerequisites for your application by going to project properties -> Publish -> Prerequisites. So now, if the required framework is not installed on the deployment machine, the setup will prompt for an install.
Now, for other dlls you are using, copy those dlls to your bin folder of the project and add the files while creating setup. This will solve the problem.

In MSVC cannot view the source code of external libraries but have source code

I'm running visual studio 2010 (ultimate), for C development.
I have a C library with pre-compiled dll's but I have the pdb and the source code.
However, when I right-click on a method to 'view definition' it just takes me to the header file and not the source. The same happens when debugging.
In visual studio I've added the folder with the source code to the 'source folder' configuration and I've also tried storing the pdb with the dll and the lib files.
Do I need to do anything else?
Thanks.
Visual Studio C/C++ source navigation is pathetic, and pretty much always has been. Personally I wouldn't waste valuable time trying to bend it to my desires.
VisualAssist (www.wholetomato.com) is a great 3rd party add-in, which IMO everybody using VS for C/C++ development should invest in. It has a 'goto' feature, which Just Works.
No interest to declare, just a long-term (distressingly so!) satisfied customer.

Resources