cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: VS2013 Solution problems

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 06 Apr 2015 23:58:21 -0400

On 3/31/2015 3:24 AM, Gisle Vanem wrote:
> I need some help from an VisualStudio expert here. Steve?
>
> I've just installed the new, free "Microsoft Visual Studio Community
> 2013"
> and tried it by loading 'projects\Windows\VC12\curl-all.sln' and
> 'projects\Windows\VC12\lib\libcurl.sln' in it. I.e. "devenv libcurl.sln".
>
> VS 2013 is "Version 12.0.31101.00 Update 4".
>
> I assumed VS 2013 would migrate the .sln/.vcxproj to a new version as
> needed (as it did in the previous versions), but that's not the case
> for me now. The message on loading the .sln is:
>
> Unsupported
> This version of Visual Studio is unable to open the following
> projects. The project types
> may not be installed or this version of Visual Studio may not
> support them.
> For more information on enabling these project types or otherwise
> migrating your assets,
> please see the details in the "Migration Report" displayed after
> clicking OK.
> - curlsrc,
> "F:\MingW32\src\inet\curl\projects\Windows\VC12\src\curlsrc.vcxproj"
> - libcurl,
> "F:\MingW32\src\inet\curl\projects\Windows\VC12\lib\libcurl.vcxproj"
>
>
> No changes required
> These projects can be opened in Visual Studio 2013, Visual Studio
> 2012, and
> Visual Studio 2010 SP1 without changing them.
> - curl-all,
> "F:\MingW32\src\inet\curl\projects\Windows\VC12\curl-all.sln"
>
>
> And from the migrate report:
> (via 'lynx -dump
> file:///F:/MingW32/src/inet/curl/projects/Windows/VC12/UpgradeLog.htm')
>
> Migration Report -
>
> Overview
>
> Project Path Errors Warnings Messages
> curlsrc src\curlsrc.vcxproj 1 0 0
> libcurl lib\libcurl.vcxproj 1 0 0
> Solution curl-all.sln 0 0 1
>
> Solution and projects
>
> curlsrc
>
> Message
> src\curlsrc.vcxproj: The application which this project type is
> based on was not found.
> Please try this link for further information:
> http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942
>
> libcurl
>
> Message
> lib\libcurl.vcxproj: The application which this project type is
> based on was not found.
> Please try this link for further information:
> http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942
>
> Solution
>
> Message
> Show 1 additional messages
> curl-all.sln: The solution file does not require migration.
> Hide 1 additional messages
>
> --------------
>
> I assume the message "The application which this project type is based
> on was
> not found." is the culprit. But which application? cl.exe or what? Are
> anybody
> familiar with such errors? Maybe there are some problems with some
> MSbuild
> settings or env-vars?
>
> If I build from the cmd-line [1], all seems okay. E.g.:
> msbuild -nologo -p:Configuration="DLL Debug" -fileLogger libcurl.sln
>
> I end up with a "<curl_root>\build\Win32\VC12\DLL Debug\libcurld.dll".
>
>
> [1] After a "generate.bat VC12".
>

TL;DR:
I don't know why you're seeing those errors.
{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942} is the project type for C/C++ so
that is right. I was unable to reproduce in a Windows 7 x64 VM. I did
encounter two unrelated problems though.

Details:
Here is what I did using a clean MS updated Windows 7 x64 Enterprise VM:

Download and install Visual Studio 2013 Community web installer,
defaults used.
Download and install msysgit, change context menu install option from
cheetah plugin to Git GUI and Bash entries, all other defaults used.
No reboot was required for either install.
Create a directory to store git repos C:\repos
Right-click on that 'repos' folder in explorer and choose 'Git Bash
Here' from the context menu
You should now have a git bash prompt open at /c/repos
Run these commands from bash:

git clone https://github.com/bagder/curl.git
cd curl/src
printf "#include \"tool_hugehelp.h\"\nvoid hugehelp(void) {}\n" >
tool_hugehelp.c

Copy or link curlbuild.h from curlbuild.h.dist. I link it but you need
admin privileges to do that.
Open an administrator command prompt:

cd /d C:\repos\curl\include\curl
mklink curlbuild.h curlbuild.h.dist

Open a regular command prompt:

cd /d C:\repos\curl\projects
generate vc12

In explorer navigate to the folder C:\repos\curl\projects\Windows\VC12
and click on curl-all.sln
Visual Studio 2013 Community should load curl-all.sln
 From the configuration dropdown on the toolbar choose 'DLL Debug - DLL
Windows SSPI - DLL WinIDN'
F7 to build

The two unrelated problems are the tool_hugehelp.c and curlbuild.h both
of which should appear in the project file listing but don't unless they
have been created before the generate.bat is called. I think
generate.bat should add them to the projects and then maybe? we alter
the project file to make both of the files so the manual steps aren't
necessary.

For now if you want the built in manual in tool_hugehelp it can be done
if you have groff or nroff. For example if you have nroff at
/c/gnuwin32/bin/nroff you would switch to the /c/repos/curl/src
directory in git bash and run this:

echo '#include "tool_setup.h"' > tool_hugehelp.c
echo '#ifndef HAVE_LIBZ' >> tool_hugehelp.c
env LC_ALL=C /c/gnuwin32/bin/nroff -c -Tascii -man ../docs/curl.1 |
/bin/perl ../src/mkhelp.pl ../docs/MANUAL >> tool_hugehelp.c
echo '#else' >> tool_hugehelp.c
env LC_ALL=C /c/gnuwin32/bin/nroff -c -Tascii -man ../docs/curl.1 |
/bin/perl ../src/mkhelp.pl -c ../docs/MANUAL >> tool_hugehelp.c
echo '#endif /* HAVE_LIBZ */' >> tool_hugehelp.c

You could instead do something similar with groff, but from the command
prompt in the C:\repos\curl\src directory. You would need regular (ie
not msysgit version) perl, gzip and groff in your path for this:

echo #include "tool_setup.h"> tool_hugehelp.c
echo #ifndef HAVE_LIBZ>> tool_hugehelp.c
groff -mtty-char -Tascii -P-c -man ..\docs\curl.1 | mkhelp.pl
..\docs\MANUAL >> tool_hugehelp.c
echo #else>> tool_hugehelp.c
groff -mtty-char -Tascii -P-c -man ..\docs\curl.1 | mkhelp.pl -c
..\docs\MANUAL >> tool_hugehelp.c
echo #endif /^* HAVE_LIBZ ^*/>> tool_hugehelp.c

I saved the state of the VM so if there's anything you want me to try
let me know. You can contact me off-list if you want.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-04-07