[z88dk-dev] Visual Studio Version

Bridge to the z88dk-developers mailing list
Post Reply
pscust
Well known member
Posts: 194
Joined: Thu Jun 23, 2011 3:34 pm

[z88dk-dev] Visual Studio Version

Post by pscust »

The current supported Visual Studio version in the z88dk project is VS2010.

I am using VS2015 (
https://www.visualstudio.com/en-us/prod ... y-vs.aspx)
because of it's better support for C++11 - see
https://msdn.microsoft.com/en-us/library/hh567368.aspx

VS2015 refuses to build the project unless I retarget the solution to the
current version, which adds the following lines to the *.vcxproj files:
<PlatformToolset>v140</PlatformToolset>

I then need to remember to not checkin these files.

I would like to propose to retarget the solution to VS2015 and checkin the
changed project files.

Any comments?
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

I would like to propose to retarget the solution to VS2015 and checkin the
changed project files.
I'm using an academic version of VS2010. I haven't checked out the latest free VS express but if MS's free tools can be used to compile, I don't object to requiring the latest version. I don't know if anyone else has tried the latest VS express?



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
stefano
Well known member
Posts: 2151
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

>I'm using an academic version of VS2010. I haven't checked out the latest free VS express but if MS's free tools can be used to compile, I don't object to requiring the latest version. I don't know if anyone else has tried the latest VS express?

I think I have VS 2010 too (even if I mostly use MinGW), my latest attempt was to get a sort of universality by hand editing the project files and removing the "ToolSet" references.

By the way I only partially succeded because z80asm seems quite different and failing.. probably because of my crap redefinition of the missing functions.



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
stefano
Well known member
Posts: 2151
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

>By the way I only partially succeded because z80asm seems quite different and failing.. probably because of my crap redefinition of the missing functions.


Forgot to say: it is a good reason to force the ToolSet version on z80asm, expecially if it makes you more comfortable.
I'd try to keep the other components as they are, if possible.



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

I think I have VS 2010 too (even if I mostly use MinGW), my latest attempt was to get a sort of universality by hand editing the project files and removing the "ToolSet" references.
The z88dk.sln was a long time coming :) I can edit files but it doesn't build all the executables for me yet. The build window shows everything building successfully but I think there is some problem with moving some of the executables to the correct destination dir in both the debug and release modes. The final exe of some of the tools just disappear into thin air.

I have no problem building z80asm but z80asm is another that seems to build from z88dk.sln but then the exe is never written. I noticed double slashes in the output filename so I don't know if that has anything to do with it.



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
pscust
Well known member
Posts: 194
Joined: Thu Jun 23, 2011 3:34 pm

Post by pscust »

Visual Studio 2015 Community edition is free for open source projects.

I use Visual Studio during development and debugging, and a MinGW shell to
build the whole package.

VS2015 refuses to compile the project if the
<PlatformToolset>v140</PlatformToolset>
line is missing. This is the reason for having to retarget.

After your comment on missing executables, I have checked and corrected all
projects to build the executables in z88dk/bin. The default was to build
under z88dk\win32\Debug or z88dk\win32\Release, depending on the current
configuration setting.

The z88dk.sln is now building:
z88dk\bin\appmake.exe
z88dk\bin\copt.exe
z88dk\bin\sccz80.exe
z88dk\bin\z80asm.exe
z88dk\bin\z80nm.exe
z88dk\bin\zcc.exe
z88dk\bin\zcpp.exe


On Wed, Jul 6, 2016 at 10:42 PM, alvin (alvin_albrecht@...) <
lists@...> wrote:
I think I have VS 2010 too (even if I mostly use MinGW), my latest
attempt was to get a sort of universality by hand editing the project files
and removing the "ToolSet" references.
The z88dk.sln was a long time coming :) I can edit files but it doesn't
build all the executables for me yet. The build window shows everything
building successfully but I think there is some problem with moving some of
the executables to the correct destination dir in both the debug and
release modes. The final exe of some of the tools just disappear into thin
air.

I have no problem building z80asm but z80asm is another that seems to
build from z88dk.sln but then the exe is never written. I noticed double
slashes in the output filename so I don't know if that has anything to do
with it.




------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
stefano
Well known member
Posts: 2151
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

The z88dk.sln was a long time coming :) I can edit files but it doesn't build all the executables for me yet.
I remember we (me?) wiped lots of old rubbish connected to VS keeping only the working parts.
I tried again two days ago with a minimalistic skeleton which (sort of) worked for me.. I just had to peek the created executables in the "Debug" or "Release" subfolders.

A reason for having Visual Studio at hand could be to squeeze out some more speed (I have the impression that both MinGW and CygWin waste quite a bit of power to support/emulate the Unix environment).

By the way I see that Paulo is playing around the thing and I'm glad he's doing it !



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
pscust
Well known member
Posts: 194
Joined: Thu Jun 23, 2011 3:34 pm

Post by pscust »

I've created new Visual Studio 2015 project files under win32 for all z88dk
executables, each with a post-build action to copy the Release exe file to
the bin directory. I've also deleted old .vcproj files of older Visual
Studio versions. All the projects are integrated in the win32\z88dk.sln
solution file.

I've created a new batch file vsbuild.cmd that builds the whole solution.

The vscmake.bat files in each directory are redundant and could be deleted.

To build a single project, you can type at z88dk:
devenv win32\z88dk.sln /Build Release /Project appmake

or to build the Debug version
devenv win32\z88dk.sln /Build Debug /Project appmake

to rebuild the whole solution from the command line:
devenv win32\z88dk.sln /Rebuild Release


Please let me know of any issues.

Regards,
Paulo



On Thu, Jul 7, 2016 at 7:13 AM, Stefano Bodrato (stefano_bodrato@...)
<lists@...> wrote:
The z88dk.sln was a long time coming :) I can edit files but it doesn't
build all the executables for me yet.
I remember we (me?) wiped lots of old rubbish connected to VS keeping only
the working parts.
I tried again two days ago with a minimalistic skeleton which (sort of)
worked for me.. I just had to peek the created executables in the "Debug"
or "Release" subfolders.

A reason for having Visual Studio at hand could be to squeeze out some
more speed (I have the impression that both MinGW and CygWin waste quite a
bit of power to support/emulate the Unix environment).

By the way I see that Paulo is playing around the thing and I'm glad he's
doing it !




------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
pscust
Well known member
Posts: 194
Joined: Thu Jun 23, 2011 3:34 pm

Post by pscust »

I've created new Visual Studio 2015 project files under win32 for all z88dk
executables, each with a post-build action to copy the Release exe file to
the bin directory. I've also deleted old .vcproj files of older Visual
Studio versions. All the projects are integrated in the win32\z88dk.sln
solution file.

I've created a new batch file vsbuild.cmd that builds the whole solution.

The vscmake.bat files in each directory are redundant and could be deleted.

To build a single project, you can type at z88dk:
devenv win32\z88dk.sln /Build Release /Project appmake

or to build the Debug version
devenv win32\z88dk.sln /Build Debug /Project appmake

to rebuild the whole solution from the command line:
devenv win32\z88dk.sln /Rebuild Release


Please let me know of any issues.

Regards,
Paulo



On Thu, Jul 7, 2016 at 7:13 AM, Stefano Bodrato (stefano_bodrato@...)
<lists@...> wrote:
The z88dk.sln was a long time coming :) I can edit files but it doesn't
build all the executables for me yet.
I remember we (me?) wiped lots of old rubbish connected to VS keeping only
the working parts.
I tried again two days ago with a minimalistic skeleton which (sort of)
worked for me.. I just had to peek the created executables in the "Debug"
or "Release" subfolders.

A reason for having Visual Studio at hand could be to squeeze out some
more speed (I have the impression that both MinGW and CygWin waste quite a
bit of power to support/emulate the Unix environment).

By the way I see that Paulo is playing around the thing and I'm glad he's
doing it !




------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
pscust
Well known member
Posts: 194
Joined: Thu Jun 23, 2011 3:34 pm

Post by pscust »

The vsbuild.cmd batch file is now extended to create the whole library from
a Win32 command line. In the process I discovered and fixed a bug in zcc
while creating temporary file names. The same code exists in appmake, and I
have fixed it also, although I was not able to test appmake in a scenario
where it creates temporary files.

The bug was in the usage of the tmpnam() function - in Win32 it creates a
full pathname of a temporary file, and the get_temporary_filename() was
calling it twice and concatenating the two results, getting invalid file
names in the process, e.g. 'C:\TEMP\xxxC:\TEMP\xxy'.

On Tue, Jul 12, 2016 at 1:06 PM, Paulo Custodio <pauloscustodio@...>
wrote:
I've created new Visual Studio 2015 project files under win32 for all
z88dk executables, each with a post-build action to copy the Release exe
file to the bin directory. I've also deleted old .vcproj files of older
Visual Studio versions. All the projects are integrated in the
win32\z88dk.sln solution file.

I've created a new batch file vsbuild.cmd that builds the whole solution.

The vscmake.bat files in each directory are redundant and could be
deleted.

To build a single project, you can type at z88dk:
devenv win32\z88dk.sln /Build Release /Project appmake

or to build the Debug version
devenv win32\z88dk.sln /Build Debug /Project appmake

to rebuild the whole solution from the command line:
devenv win32\z88dk.sln /Rebuild Release


Please let me know of any issues.

Regards,
Paulo



On Thu, Jul 7, 2016 at 7:13 AM, Stefano Bodrato (
stefano_bodrato@...) <lists@...> wrote:
The z88dk.sln was a long time coming :) I can edit files but it doesn't
build all the executables for me yet.
I remember we (me?) wiped lots of old rubbish connected to VS keeping
only the working parts.
I tried again two days ago with a minimalistic skeleton which (sort of)
worked for me.. I just had to peek the created executables in the "Debug"
or "Release" subfolders.

A reason for having Visual Studio at hand could be to squeeze out some
more speed (I have the impression that both MinGW and CygWin waste quite a
bit of power to support/emulate the Unix environment).

By the way I see that Paulo is playing around the thing and I'm glad he's
doing it !




------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
pscust
Well known member
Posts: 194
Joined: Thu Jun 23, 2011 3:34 pm

Post by pscust »

The vsbuild.cmd batch file is now extended to create the whole library from
a Win32 command line. In the process I discovered and fixed a bug in zcc
while creating temporary file names. The same code exists in appmake, and I
have fixed it also, although I was not able to test appmake in a scenario
where it creates temporary files.

The bug was in the usage of the tmpnam() function - in Win32 it creates a
full pathname of a temporary file, and the get_temporary_filename() was
calling it twice and concatenating the two results, getting invalid file
names in the process, e.g. 'C:\TEMP\xxxC:\TEMP\xxy'.

On Tue, Jul 12, 2016 at 1:06 PM, Paulo Custodio <pauloscustodio@...>
wrote:
I've created new Visual Studio 2015 project files under win32 for all
z88dk executables, each with a post-build action to copy the Release exe
file to the bin directory. I've also deleted old .vcproj files of older
Visual Studio versions. All the projects are integrated in the
win32\z88dk.sln solution file.

I've created a new batch file vsbuild.cmd that builds the whole solution.

The vscmake.bat files in each directory are redundant and could be
deleted.

To build a single project, you can type at z88dk:
devenv win32\z88dk.sln /Build Release /Project appmake

or to build the Debug version
devenv win32\z88dk.sln /Build Debug /Project appmake

to rebuild the whole solution from the command line:
devenv win32\z88dk.sln /Rebuild Release


Please let me know of any issues.

Regards,
Paulo



On Thu, Jul 7, 2016 at 7:13 AM, Stefano Bodrato (
stefano_bodrato@...) <lists@...> wrote:
The z88dk.sln was a long time coming :) I can edit files but it doesn't
build all the executables for me yet.
I remember we (me?) wiped lots of old rubbish connected to VS keeping
only the working parts.
I tried again two days ago with a minimalistic skeleton which (sort of)
worked for me.. I just had to peek the created executables in the "Debug"
or "Release" subfolders.

A reason for having Visual Studio at hand could be to squeeze out some
more speed (I have the impression that both MinGW and CygWin waste quite a
bit of power to support/emulate the Unix environment).

By the way I see that Paulo is playing around the thing and I'm glad he's
doing it !




------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

The bug was in the usage of the tmpnam() function - in Win32 it creates a full pathname of a temporary file, and the get_temporary_filename() was calling it twice and concatenating the two results, getting invalid file names in the process, e.g. 'C:\TEMP\xxxC:\TEMP\xxy'.
I'm getting compiler errors under windows now because the initial "C:\TEMP\" is missing. If I revert these changes, things work fine.

I'm still using VS2010 with your z88dk.sln to build. Is it different under VS2015?



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
pscust
Well known member
Posts: 194
Joined: Thu Jun 23, 2011 3:34 pm

Post by pscust »

Running the following program in my Win32 box
#include <stdio.h>
#include <stdlib.h>
int main() { puts(tmpnam(NULL)); return 0; }

I get:
C:\Users\Paulo\AppData\Local\Temp\s9vc.0 with
TMP=C:\Users\Paulo\AppData\Local\Temp
C:\Users\Paulo\s92o.0 with TMP undefined

What is the result in your box? Are you building with the new vsbuild.cmd?


I have created new project files for each executable under win32, and
removed the old project files. With this I fixed several link warnings. The
z88dk.sln solution file is just a link to all these project files. Each
project file was created with default compile and link flags, and with the
defines _CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_DEPRECATE added.


On Wed, Jul 13, 2016 at 11:00 PM, alvin (alvin_albrecht@...) <
lists@...> wrote:
The bug was in the usage of the tmpnam() function - in Win32 it creates a
full pathname of a temporary file, and the get_temporary_filename() was
calling it twice and concatenating the two results, getting invalid file
names in the process, e.g. 'C:\TEMP\xxxC:\TEMP\xxy'.
I'm getting compiler errors under windows now because the initial
"C:\TEMP\" is missing. If I revert these changes, things work fine.

I'm still using VS2010 with your z88dk.sln to build. Is it different
under VS2015?




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
patterns at an interface-level. Reveals which users, apps, and protocols
are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning
reports.http://sdm.link/zohodev2dev
Post Reply