Build ATL VS2010 project on CI server - visual-studio-2010

I need to build VS2010 C++ ATL project on CI server with no VS2010 installed.
The project can be successfully built on developers machine with VS2010 installed. But VS2010 cannot be installed to CI servers because that requires a license.
So, for now I'm trying the following approach:
Installed VS2010 Express
Installed Microsoft Windows SDK for Windows 7
Installed Windows Driver Kit (it includes ATL and MFC)
Although I have ATL headers and libs installed on the CI machine, I'm getting the following errors:
error C2039: 'AtlSetPerUserRegistration' : is not a member of 'ATL'
error C3861: 'AtlSetPerUserRegistration': identifier not found
I compared atlbase.h headers from VS2010 installation and from WDK. They are different:
- atlbase.h from VS2010 installation does have AtlSetPerUserRegistration definition;
- atlbase.h from WDK installation does not have it.
That causes an error mentioned above.
The question is: how to configure CI build machine for building ATL projects without installing VS2010?
Update:
Checking atldef.h file I found the following:
VS2010 version has the line:
#define _ATL_VER 0x0A00 // Active Template Library version 10.00
and WDK version has the line:
#define _ATL_VER 0x0800 // Active Template Library version 8.00
So, WDK ATL version differs from the VS2010 ATL version. That's why they're not 100% compatible.
Now the question is: How to get ATL v10.0 on the build server without having VS2010 installed?

In case if anyone else meets the same issue, here is a workaround:
The required version of ATL is available on developers machine with VS2010 installed (e.g. VS2010 Professional).
It is located in the folder %VCINSTALLDIR%ATLMFC.
By default it is c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
Folder ATLMFC can be copied to the build server by hands into %VCINSTALLDIR%, where VS2010 Express is installed. And that makes build server able to build VS2010 ATL projects without installing VS2010.
Though this is a workaround. And I'd like to see better solution if any. So, I'm not accepting my answer.

Related

mfc120.dll missing for an application built in VS2013

I have a VC++ based application developed in VS2010 which uses some of the win32 component. I ported the code in VS2013 and I built the code after removing all compilation error in Release Mode. Now when I am trying to run the exe in Computer where VS2013 is installed it is working fine where as it is giving an error of mfc120.dll is missing where only VS2010 is installed. I don't think after building the code in Release mode I should get an error of missing dll. I have not tried to run the exe where no Visual Studio is installed.
If you are using the DLL version of the MFC you also need to install the corresponding VS-2013 runtime DLLs vsredist_x86
Or you switch to a complete static build.
I have found out the solution for this problem. Basically the win32 code I was building was using the Configuration Properties->General-> 'Use MFC in a Shared DLL' which I changed to 'Use MFC in a Shared DLL'. All working fine there after

MSVCR100D.dll missing when running Allegro project in debug

I have Allegro 5 set up with VS2012 on Windows 8 and am trying to compile the sample code from the Allegro wiki. I have installed VC++ 2010 Redist. (both x86 and x64) and I am able to build/run the project in release just fine.
The issue is that when trying to run it in debug it crashes complaining that MSVCR100D.dll is missing. It was my understanding that the non-debug and debug versions of this dll should be included with VC++ 2010? Any ideas on how to fix this other than just downloading the dll from somewhere and dropping it in manually?
I would guess that you are using a binary package of Allegro built for VC++ 2010 (v10). You should be using the ones for 2012 (v11) or compile from source by yourself. Mixing runtimes is not advisable.
Allegro 5.0.8 is the first to have binaries for v11 and while normally they would be up at http://www.allegro.cc/files, they currently are only available at the release announcement thread.

Sqlite not in list of Visual Studio data source options

Downloaded and ran SQLite setup.
Added dll reference to my project
In Server Explorer, added new connection, clicked 'Change' for data source and SQLite was one of the options.
Connected and used my tables.
Then...VS 2010 crashed.
When I reloaded my project, my connection wasn't in Server explorer, so tried to add it again.
SQLite was not in the list of options.
Re-ran SQLite setup, deleted/re-added reference, restarted project...still no SQLite in the list.
How can I get SQLite connected in Server Explorer???
This is an old question but for someone, like me, who finds this before there is a newer answer:
missing SQLite data provider in VS 2013
Basically for the latest versions of SQLite you can download an installer that includes the components
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
Choose the right setup for you, for me was:
Setups for 32-bit Windows (.NET Framework 4.5.1)
sqlite-netFx451-setup-bundle-x86-2013-1.0.94.0.exe
I have Windows 7 x64 with Visual Studio community 2015 and this solution worked for me.
Basically you need install SQLite bundel and check the "Install the designer component for Visual Studio 2015".
If you have different version from 2015 (2010/2013 etc.) just search for the bundle the suits your version.
1. Go to:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
2. Download "sqlite-netFx46-setup-bundle-x86-2015-1.0.104.0" (download the most updated, this is the one I found).
Or by a direct link:
http://system.data.sqlite.org/downloads/1.0.104.0/sqlite-netFx46-setup-bundle-x86-2015-1.0.104.0.exe
3. Run the setup:
4. Result:
You can find installers on the System.Data.SQLite Dowload Page. Seteps files will suit your needs.
For example, the description of the Setups for 64-bit Windows (.NET Framework 4.0) states:
This setup package features the mixed-mode assembly and will install all the necessary runtime components and dependencies for the x64 version of the System.Data.SQLite 1.0.81.0 (3.7.12.1) package. The Visual C++ 2010 SP1 runtime for x64 is included. The .NET Framework 4.0 is required.
None of answers worked for me. in addition to #E235 answer
i added sqlite nuget package
updated ef to 6.1.3
then it worked i was able to see datasource

application failed to initialize properly (0xc0150002) [duplicate]

This question already has answers here:
The application failed to initialize properly (0xc0150002)
(5 answers)
Closed 5 years ago.
my mfc application created in visual studio 5 running on windows server 2000 sp4, i create a release for it and try running it win xp slp2. it gives me application failed to initialize properly (0xc0150002)
i have tried following things
-Install Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) the one that comes within the release folder as well as one downloadable from website
copied all dll and mainfest from microsoft visual sutdio\vc\redist
I still keep receiving the same messsage. c
what could be wrong?how can i fix it
some things to check:
check the /SUBSYSTEM linker option for you project. It might include OS major/minor version numbers.
ensure that you are using appropriate Windows XP PlatformSDK on DEV machine; check values of WINVER, _WIN32_WINNT
use depends to see whether the problem is in unresolved dependencies
check the version of runtime that your application requires with that on target machine. I usually do this by looking at the app's manifest from one side and into WinSxS folder of the target machine from another (recently there had been an ATL Security update from Microsoft http://msdn.microsoft.com/en-us/visualc/ee309358.aspx; new binaries created by updated Visual Studio will not run on machines that haven't the same updated version of runtime).
It is possible you have applied a security update or compiler update to your VS2005 SP1. That makes it generate a manifest that requests a different MFC/CRT-dll than the one installed with Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) .
Try to use Depends.exe and open your application, then in the menu choose "Profile". Look in the output window below for a more detailed description.
Are you trying to run the debug version? That may give you an error similar to 0xc0150002. Try the release build, or you could compile against the static libraries rather than dynamic libraries. If you get this problem on a release build then the chances are that it's a missing dll (in which case try running Depends.exe) or an incorrect manifest.
If you have a missing dependency on a runtime dll you could try creating a deployment project for it as this will detect the appropriate runtime dlls and build it into an installer for you.

undeclared identifier SO_EXCLUSIVEADDRUSE when building Apache Axis2/C

I'm attempting to build Apache Axis2/C (actually I'm building the WSO2 WSF/C++ wrapper for it) and it keeps giving me an error when it comes across the symbol SO_EXCLUSIVEADDRUSE. It's a socket option, and MSDN says it should be available. I'm using MSVC++ 6.0 on Win Server 2k3. I don't have a choice about the compiler or the OS... if I was on linux, I'd be done already :P
I looked at a VS2005 installation and discovered that it contains the #define for that constant in winsock2.h. It's not there in the winsock2.h that I have for MSVC6. Also, in VS2005, it's under the PlatformSDK folder inside the VS2005 directory, whereas there doesn't appear to be any such directory on for MSVC6. Why is this symbol missing? How can I get it? I'm tempted to just copy it across, but who knows what else I'll be missing down the road... Any ideas?
Since Visual Studio .Net 2003, Microsoft change its way to deliver the PlatformSDK. It allows the C/C++ compiler to use PlatformSDK other than the bundled version with VC package.
You could install PlatformSDK for Windows Server 2k3, but The last SDK that will work with VC 6.0 is the February 2003 Edition which is not available from Microsoft website.
So you could simply copy the #define to your code before using SO_EXCLUSIVEADDRUSE. It should work and support by Win2k3.

Resources