How to Open .win Files in windows 7? - database

I am installing Alenka and need to run Makefile.win file in windows 7.
How can I do that?

If you have Visual Studio, run the Visual Studio Command prompt from the Start menu, change to the directory containing Makefile.win and type this:
nmake -f Makefile.win
You can also use the normal command prompt and run vsvars32.bat (c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools for VS2008). This will set up the environment to run nmake and find the compiler tools.

Related

Build curl source code with Visual Studio Developer command line (NMAKE)

I want to use libcurl in my C program. So I have curl-7.87.0 but some errors happen in x64 build.
in x86 build does not have any errors but its have libcurl.lib not libcurl.a in libs.
To build in Visual Studio 2022 Developer command prompt:
cd curl-7.87.0\winbuild
nmake /f Makefile.vc mode=dll VC=10 debug=no machine=x64
I guss "developer command prompt" uses x86 nmake. Like in image:"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\ HostX86\x86 \nmake.exe"
What can I do to solve it?
Thanks for any help.
I Copied all files of HostX64\x64 to HostX86\x86 and build again but again those errors.

Failed to compile PuTTY for Windows: fatal error RC1015: cannot open include file 'winresrc.h'

I am trying to compile PuTTY for Windows on my Windows 10 machine. After I download the source code, I followed the steps from the README file:
For building on Windows:
- windows/Makefile.vc is for command-line builds on MS Visual C++
systems. Change into the `windows' subdirectory and type `nmake
-f Makefile.vc' to build all the PuTTY binaries.
I needed to add the following path to the PATH environment variable:
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64
Because the Makefile.vc is calling rc without absolute path.
I run the make file and received the following error:
C:\Users\myuser\Desktop\Putty For Windows\windows>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe" -f Makefile.vc
Microsoft (R) Program Maintenance Utility Version 14.00.24234.1
Copyright (C) Microsoft Corporation. All rights reserved.
rc /Fopageant.res -r -I..\./ -I..\charset/ -I..\windows/ -I..\unix/ -DWIN32 -D_WIN32 -DWINVER=0x0400 ..\windows\pageant.rc
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.
..\windows\rcstuff.h(15) : fatal error RC1015: cannot open include file 'winresrc.h'.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\rc.EXE"' : return code '0x1'
Stop.
It writes that it can't open the include file winresrc.h.
This file doesn't exist in the PuTTY source folder, so I tried to copy the file from my Windows 10 SDK path:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\winresrc.h
But I received the same error even after I copied the include file to the folder of Putty For Windows\windows.
nmake -f makefile.vc must be run at a cmd prompt configured for an installation of VC++ (or the VC++ build tools), and that means not just the PATH but also INCLUDE, LIB etc. It will work if run at a VS developer command prompt, which sets the whole environment correctly.
As an alternative, the PuTTY for Windows package comes with Visual C++ .sln and .vcxproj project files for building from the IDE. The windows\vs2012\putty.sln solution imports fine into the latest VS 2019, and builds (albeit with many warnings) after fixing the header references in putty-src\windows\version.rc2.
#include "..\\version.h" // instead of "version.h"
#include "..\\licence.h" // instead of "license.h"

Failure adding assembly to the cache: This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded

I am having this same problem:
IsVisualStudio2012ProInstalled() method not found error when running an SSIS package from VS2012 (I didn't have enough rep to comment and ask for help there). This issue started when I had visual studio 2012 installed but then installed visual studio 2015, the shop I work for uses both.
I followed the instructions of the #1 answer but getting the error below
I've entered this in command prompt:
C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\PrivateAssemblies>"C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\Bin\gacutil.exe" /if Microsoft.SqlServer.Dts.Design.dll
Error:
Failure adding assembly to the cache: This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
I finally got this to work by finding a newer version of gacutil that was on my computer. You can see originally I was looking in the v7.0a folder but found another copy in a v8.0a folder that I used that worked.
cd "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bin\NETFX 4.0 Tools\gacutil.exe"
/if Microsoft.SqlServer.Dts.Design.dll

Unable to set compiler in CMake

Can someone help me set up compiler for CMake and thus help me understand how all this works? I intend to use point cloud library, but I'll use more simple example here (which is also not working) so I could explain my problem better.
I have next components:
Visual Studio 10 (C:\Program Files (x86)\Microsoft Visual Studio 10.0)
CMake 3.7.2 (C:\Program Files\CMake)
"hellocmake" project - complete file structure as presented here (C:\Users\my_name\Documents\Visual Studio 2010\Projects\hellocmake)
I tried to run CMake Gui, pointed to a source and build folders, configured for "Visual Studio 10 2010 Win 64" and run out as expected with:
"The C compiler identification is unknown
The CXX compiler identification is unknown"
I understand I need to setup compiler, but I'm not sure at this point what should I do. I tried so far:
From visual studio open command prompt, navigate to CMake and run "cmake -D CMAKE_CXX_COMPILER="g++" CMAKE_CC_COMPILER="gcc"
Output: "The C compiler identification is unknown. The CXX compiler identification is unknown. No CMAKE_C_COMPILER could be found"
g++ was not a full path and was not found in PATH
I added C:\Program Files\CMake\bin and C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe to Environment Variables -> PATH and tried all again. I have the same output as above.
Putted these lines in CMakeLists.txt inside C:\Program Files\CMake:
SET(CMAKE_C_COMPILER C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe)
SET(CMAKE_CXX_COMPILER C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe)
and ended up with the same "No CMAKE_C_COMPILER could be found" output.
Also tried to put a quotes for CMAKE_C_COMPILER path, to use CMAKE_CXX_COMPILER:PATH in command prompt, to run CMake Gui as admin and nothing works.
I really don't know what to try more now. Also, I'm not sure how all this work after so many unsuccessful trials.
Any help will be highly appreciated. Thanks!
EDIT:

Reference error while compiling C file in VS2010 command-prompt

I have VS 2010 installed on my system and i was trying to compile a simple hello.c in VS command prompt. The compilation gave an error.
Fatal Error C1083: Cannot open include file: 'stdio.h' no such file, folder exist
Why this error is coming ?? Does VS2010 not include reference files/assemblies for C.
VS 2010 certainly does contain the standard headers. You should check that your command prompt environment is set up correctly. There should be an environment variable named INCLUDE that has a directory similar to the cfollowing (among other directories) in it:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE
that directory (the name may vary slightly, for example depending on if your machine is a 64-bit OS of not) should include stdio.h
If you don't have such a directory in your environment, then you're not setting up the environment correctly. You should use on of the "Visual Studio Command Prompt" shortcuts that VS installs, or simply run
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
With the appropriate parameter to get the environment you want (x86 or amd64 for example).
If the INCLUDE environment variable does have an entry like that, but the stdio.h file doesn't exist, then you might need to reinstall VS.
I had a similar problem as the OP the VC folder was missing most of the files. I tried both repairing and uninstalling/reinstalling VS 2010 but neither worked.
What worked for me was installing the Microsoft Visual C++ 2010 Redistributable Package (x86).Microsoft Visual C++ 2010 Redistributable Package (x86)
There are so many versions of so much Windows system code that it's easy for a path to become invalid.
In my case:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include
and
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib
needed to be changed to::
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
and
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
i.e. v7.1A -> v7.0A (don't ask why, it just part of the everyday, tiresome task of dealing with Microsoft!).
I had the same problem. The file stdio.h did not exist in folder include. I removed VS 2010 using the Control Panel then reinstalled, but this didn't solve the problem.
I then used the VS 2010 installation CD to remove all of VS 2010, and manually removed anything leftover by Control Panel. I then installed VS 2010 professional again. The problem was solved.

Resources