Visual studio 2015 build failures 1.3.4

67 views
Skip to first unread message

Robin Ellis

unread,
Nov 12, 2016, 5:59:31 PM11/12/16
to fltk.general
Hi,

I am currently studying Bjarne Stroustrup's Programming: Principles and Practice using C++(2nd edition)

I have installed an earlier version, I can't remember which version. but I have now since tried to install FLTK1.3.4 on a new computer,
but i keep getting a lot of build errors and need assistance.

I have attached the output.

I have edited the abi_version.edi to:

#define FL_ABI_VERSION 10304

cleaned and rebuild but no luck.

thanks
Robin
build output.txt

Ian MacArthur

unread,
Nov 12, 2016, 6:13:51 PM11/12/16
to fltkg...@googlegroups.com
Hmm, I don’t have anything useful to suggest - I just built it with VS 2015 “Community Edition” on an slightly duff Win10 laptop and it seems to go OK, both 32-bit and 64-bit builds are fine. So far as I can tell...



From your log, it looks like this is the step that fails:

4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(123,5): error MSB3073: The command "copy /Y H:\Google Drive\Visual Studio 2015\Projects\fltk-1.3.4\ide\VisualC2010\..\..\abi-version.ide H:\Google Drive\Visual Studio 2015\Projects\fltk-1.3.4\ide\VisualC2010\..\..\FL\abi-version.h
4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(123,5): error MSB3073: :VCEnd" exited with code 1.


All the subsequent failures seem to arise due to the failure to copy abi-version.ide to FL/abi-version.h...
Though why that should fail I can not tell.

Is there something weird about your build paths or something? Looks OK from your log, but...

Sorry, I have nothing helpful here.




Greg Ercolano

unread,
Nov 12, 2016, 6:24:47 PM11/12/16
to fltkg...@googlegroups.com, Ian MacArthur
On 11/12/16 15:13, Ian MacArthur wrote:
>>From your log, it looks like this is the step that fails:
> error MSB3073: The command "copy /Y H:\Google Drive\Visual Studio 2015\XXXXX\abi-version.ide H:\Google Drive\Visual Studio 2015\XXXXXX


I wonder if it's the spaces in the filenames ("Google<space>Drive") that's causing
the problem. That is a copy command, and I don't see quotes around the pathname,
so how would 'copy' know the difference between the source and destination filenames
if there's no quotes protecting the spaces?

Try locating your fltk files in a directory that doesn't have spaces in the
pathname to see if that's the problem.

Albrecht Schlosser

unread,
Nov 12, 2016, 7:25:39 PM11/12/16
to fltkg...@googlegroups.com
On 13.11.2016 00:24 Greg Ercolano wrote:
> On 11/12/16 15:13, Ian MacArthur wrote:
>> >From your log, it looks like this is the step that fails:
>> error MSB3073: The command "copy /Y H:\Google Drive\Visual Studio 2015\XXXXX\abi-version.ide H:\Google Drive\Visual Studio 2015\XXXXXX
>
>
> I wonder if it's the spaces in the filenames ("Google<space>Drive") that's causing
> the problem. That is a copy command, and I don't see quotes around the pathname,
> so how would 'copy' know the difference between the source and destination filenames
> if there's no quotes protecting the spaces?

Yep, verified.

(1) extracting the tarball in a path with spaces and building
ide/VisualC2010/fltk.sln with Visual Studio 2015 (Community) fails.

(2) The same works after patching ide/VisualC2010/fltk.lib.vcxproj to
use quotes in the copy command.

> Try locating your fltk files in a directory that doesn't have spaces in the
> pathname to see if that's the problem.

That would certainly help to build FLTK.

Another workaround would be to edit abi-version.h _after_ copying it to
FL/abi-version.h manually in place. This would prevent the copy command
from being issued, but that's not a real solution.

FWIW: Here's my working patch for ide/VisualC2010:

diff --git a/ide/VisualC2010/fltk.lib.vcxproj
b/ide/VisualC2010/fltk.lib.vcxproj
index d0a40e1..e8384eb 100644
--- a/ide/VisualC2010/fltk.lib.vcxproj
+++ b/ide/VisualC2010/fltk.lib.vcxproj
@@ -94,7 +94,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<PreBuildEvent>
- <Command>copy /Y $(SolutionDir)..\..\abi-version.ide
$(SolutionDir)..\..\FL\abi-version.h</Command>
+ <Command>copy /Y "$(SolutionDir)..\..\abi-version.ide"
"$(SolutionDir)..\..\FL\abi-version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -121,7 +121,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<PreBuildEvent>
- <Command>copy /Y $(SolutionDir)..\..\abi-version.ide
$(SolutionDir)..\..\FL\abi-version.h</Command>
+ <Command>copy /Y "$(SolutionDir)..\..\abi-version.ide"
"$(SolutionDir)..\..\FL\abi-version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">
@@ -149,7 +149,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<PreBuildEvent>
- <Command>copy /Y $(SolutionDir)..\..\abi-version.ide
$(SolutionDir)..\..\FL\abi-version.h</Command>
+ <Command>copy /Y "$(SolutionDir)..\..\abi-version.ide"
"$(SolutionDir)..\..\FL\abi-version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">
@@ -177,7 +177,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<PreBuildEvent>
- <Command>copy /Y $(SolutionDir)..\..\abi-version.ide
$(SolutionDir)..\..\FL\abi-version.h</Command>
+ <Command>copy /Y "$(SolutionDir)..\..\abi-version.ide"
"$(SolutionDir)..\..\FL\abi-version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>


Questions: do we need this patch? If yes, then also for the other ide
projects, maybe including Xcode. If no: can we ask Windows IDE users to
move their projects to another directory? Or is this a reason to think
about a patch release (1.3.4-1 or 1.3.5)?

Note: obviously we never tested paths with spaces, however I assume that
the previous versions worked (with spaces in paths) because they all
worked with relative paths (w/o explicitly copying a file).

Albrecht Schlosser

unread,
Nov 13, 2016, 5:42:27 AM11/13/16
to fltkg...@googlegroups.com
On 13.11.2016 01:25 Albrecht Schlosser wrote:
>
> Yep, verified.
>
> (1) extracting the tarball in a path with spaces and building
> ide/VisualC2010/fltk.sln with Visual Studio 2015 (Community) fails.
>
> (2) The same works after patching ide/VisualC2010/fltk.lib.vcxproj to
> use quotes in the copy command.
>
> FWIW: Here's my working patch for ide/VisualC2010:

I also found a preliminary patch for ide/VisualC2008, but I can't test
it right now with Visual Studio 2008 (maybe tonight). Maybe someone else
may want to test. Please see attached file ide_copy_command.diff

> Questions: do we need this patch? If yes, then also for the other ide
> projects, maybe including Xcode. If no: can we ask Windows IDE users to
> move their projects to another directory? Or is this a reason to think
> about a patch release (1.3.4-1 or 1.3.5)?

I'm afraid we might get more reports from users that have their FLTK
installations in paths with spaces. Hence it might be useful to upgrade
the release. To make it simple - i.e. w/o changing version numbers - I
suggest to build a new tarball with the patch and upload it as
fltk-1.3.4-1-source.tar.gz and remove the old one.

Opinions, suggestions?

PS: we could also fix the MacOS compilation warning reported by Ian.

ide_copy_command.diff

Albrecht Schlosser

unread,
Nov 13, 2016, 5:46:04 AM11/13/16
to fltkg...@googlegroups.com
On 13.11.2016 11:42 Albrecht Schlosser wrote:

>> FWIW: Here's my working patch for ide/VisualC2010:
>
> I also found a preliminary patch for ide/VisualC2008, but I can't test
> it right now with Visual Studio 2008 (maybe tonight). Maybe someone else
> may want to test. Please see attached file ide_copy_command.diff

Notes: VisualC6 and Xcode use relative filenames, so they are not
concerned. Another option for VisualC2008 and VisualC2010 might be to
remove the "$(SolutionDir)" part of the copy command which would make
them use relative filenames as well.

Reply all
Reply to author
Forward
0 new messages