'make' is not recognized as an internal or external command, operable program or batch file.

727 views
Skip to first unread message

JAMES Bruce

unread,
Jun 22, 2022, 3:08:50 AM6/22/22
to or-tools-discuss
Have tried to run the basic example of the C# code on my PC but when I try to use the following bit of code:
make build SOURCE=examples/dotnet/SimpleProgram.cs
 I get the following error:

'make' is not recognized as an internal or external command,
operable program or batch file.


I currently have or tools downloaded in the following path: 
C:\Users\LSLla\OneDrive\Documents\Computation\or-tools_VisualStudio2019

Here is my input in the .csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <LangVersion>7.3</LangVersion>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <EnableDefaultItems>false</EnableDefaultItems>
    <!-- see https://github.com/dotnet/docs/issues/12237 -->
    <RollForward>LatestMajor</RollForward>
    <RestoreSources>../../../temp_dotnet/packages;$(RestoreSources);https://api.nuget.org/v3/index.json</RestoreSources>
    <AssemblyName>Google.OrTools.BasicExample</AssemblyName>
    <IsPackable>true</IsPackable>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugType>full</DebugType>
    <Optimize>true</Optimize>
    <GenerateTailCalls>true</GenerateTailCalls>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="BasicExample.cs" />
    <PackageReference Include="Google.OrTools" Version="9.1.*" />
  </ItemGroup>
</Project>



within the .cs file, I am trying to import the following libraries:

using System;
using Google.OrTools.LinearSolver;



Any ideas?
Thanks


Laurent Perron

unread,
Jun 22, 2022, 5:21:06 AM6/22/22
to or-tools-discuss

--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/f250ad47-2725-427c-bf4b-824a64a62897n%40googlegroups.com.

JAMES Bruce

unread,
Jun 22, 2022, 7:17:54 AM6/22/22
to or-tools-discuss
I have tried this and got the following error:

the cl command was not found in your PATH
exit 127
make: *** [Makefile:271: cc] Error 127

Laurent Perron

unread,
Jun 22, 2022, 7:29:00 AM6/22/22
to or-tools-discuss
same doc, you need to use the command line supplied with visual studio

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



JAMES Bruce

unread,
Jun 22, 2022, 11:23:41 AM6/22/22
to or-tools-discuss
sorry, I have noticed that the link you sent was for C++ - is this still valid for C# working with dotnet framework? 
at the moment I am using vscode - will I need to be working with full visual studio to get this working?

Laurent Perron

unread,
Jun 22, 2022, 11:24:43 AM6/22/22
to or-tools-discuss
The library is in C++. wrapped in C#.

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Reply all
Reply to author
Forward
0 new messages