Author Topic: does not compile on windows  (Read 5402 times)

@lima

  • Newbie
  • *
  • Posts: 11
  • Karma: +2/-0
    • View Profile
does not compile on windows
« on: July 01, 2020, 03:14:51 PM »
can someone do a tutorial, to compile on windows, something more detailed, I'm not able to assemble the compiler !!

PS:(I already followed all README.MD)
« Last Edit: July 01, 2020, 03:19:29 PM by @lima »

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: does not compile on windows
« Reply #1 on: July 01, 2020, 03:23:33 PM »
If you've followed the README, at what stage does it fail with what error message?

@lima

  • Newbie
  • *
  • Posts: 11
  • Karma: +2/-0
    • View Profile
Re: does not compile on windows
« Reply #2 on: July 01, 2020, 03:38:37 PM »
c:\Retrofe>cmake RetroFE/Source -BRetroFE/Build -DGSTREAMER_ROOT=C:\gstreamer\1.0\x86
-- Selecting Windows SDK version  to target Windows 10.0.17763.
CMake Error at CMakeLists.txt:3 (project):
  Failed to run MSBuild command:

    C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

  to get the value of VCTargetsPath:

    Microsoft (R) Build Engine version 14.0.25420.1
    Copyright (C) Microsoft Corporation. All rights reserved.




(I'm very lay !!!)

    Build started 01/07/2020 11:35:29.
    Project "C:\Retrofe\RetroFE\Build\CMakeFiles\3.18.0-rc2\VCTargetsPath.vcxproj" on node 1 (default targets).
    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Retrofe\RetroFE\Build\CMakeFiles\3.18.0-rc2\VCTargetsPath.vcxproj]
    Done Building Project "C:\Retrofe\RetroFE\Build\CMakeFiles\3.18.0-rc2\VCTargetsPath.vcxproj" (default targets) -- FAILED.

    Build FAILED.

    "C:\Retrofe\RetroFE\Build\CMakeFiles\3.18.0-rc2\VCTargetsPath.vcxproj" (default target) (1) ->
    (Desktop_PlatformPrepareForBuild target) ->
      C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Retrofe\RetroFE\Build\CMakeFiles\3.18.0-rc2\VCTargetsPath.vcxproj]

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:00.63


  Exit code: 1



-- Configuring incomplete, errors occurred!
See also "C:/Retrofe/RetroFE/Build/CMakeFiles/CMakeOutput.log".

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: does not compile on windows
« Reply #3 on: July 01, 2020, 04:18:47 PM »
Which Microsoft VisualStudio did you install exactly?

The first error is usually the one to watch for:
Failed to run MSBuild command: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe to get the value of VCTargetsPath
« Last Edit: July 01, 2020, 04:22:26 PM by Pieter Hulshoff »

@lima

  • Newbie
  • *
  • Posts: 11
  • Karma: +2/-0
    • View Profile
Re: does not compile on windows
« Reply #4 on: July 01, 2020, 04:26:03 PM »
installed to see. 2015

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: does not compile on windows
« Reply #5 on: July 01, 2020, 04:33:11 PM »
Does this file even exist?
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

@lima

  • Newbie
  • *
  • Posts: 11
  • Karma: +2/-0
    • View Profile
Re: does not compile on windows
« Reply #6 on: July 01, 2020, 04:41:04 PM »
yes exite !!

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: does not compile on windows
« Reply #7 on: July 01, 2020, 07:45:54 PM »
Did you install the Windows SDK? That's the path it's trying to determine, and fails to do so as far as I can tell.

@lima

  • Newbie
  • *
  • Posts: 11
  • Karma: +2/-0
    • View Profile
Re: does not compile on windows
« Reply #8 on: July 01, 2020, 09:58:17 PM »
I installed the correct location now, but it continues to generate errors!

@lima

  • Newbie
  • *
  • Posts: 11
  • Karma: +2/-0
    • View Profile
Re: does not compile on windows
« Reply #9 on: July 01, 2020, 10:00:24 PM »
I installed the correct location now, but it continues to generate errors!
C:\Users\julio>cd c:\retrofe

c:\retrofe>cmake RetroFE/Source -BRetroFE/Build -DGSTREAMER_ROOT=C:\gstreamer\1.0\x86
CMake Warning (dev) at CMakeLists.txt:43 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable SDL2_ROOT is set to:

    C:/retrofe/RetroFE/Source/../ThirdParty/SDL2-2.0.5

  For compatibility, CMake is ignoring the variable.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:47 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable ZLIB_ROOT is set to:

    C:/retrofe/RetroFE/Source/../ThirdParty/zlib128-dll

  For compatibility, CMake is ignoring the variable.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: C:/retrofe/RetroFE/Build

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: does not compile on windows
« Reply #10 on: July 01, 2020, 10:59:48 PM »
Those are warnings. Let's ignore them for now to see if the next step gives you any trouble. We can always revisit this step if it does.

@lima

  • Newbie
  • *
  • Posts: 11
  • Karma: +2/-0
    • View Profile
Re: does not compile on windows
« Reply #11 on: July 02, 2020, 01:47:31 AM »
hear progress only error now!

just commenting that part of the file (KeyboardHandler.cp)




Quote
#include "KeyboardHandler.h"

KeyboardHandler::KeyboardHandler(SDL_Scancode s)
: scancode_(s)
, pressed_(false)
{
}

void KeyboardHandler::reset()
{
    pressed_= false;
}

bool KeyboardHandler::update(SDL_Event &e)
{
    if(e.type != SDL_KEYUP && e.type != SDL_KEYDOWN) return false;

    if(e.key.keysym.scancode == scancode_)
    {
        pressed_ = (e.type == SDL_KEYDOWN);
        return true;
    }

    return false;
}

bool KeyboardHandler::pressed()
{
    return pressed_;
}

void KeyboardHandler::updateKeystate()
{
   const Uint8 *state = SDL_GetKeyboardState(NULL);
//   pressed_ = state[scancode_];
}

CiTrON

  • Newbie
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
Re: does not compile on windows
« Reply #12 on: July 07, 2020, 02:50:37 AM »
managed to compile?