gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Problems with ds_project_template.zip - make.exe not found..

#101551 - HotChilli - Wed Sep 06, 2006 12:38 pm

I try compiling ds_project_template but Visual Studio did'nt find make! Enviroment variables is apropriate: Start->Run "make" works fine. And "make" in console command line too...

Here is Visual Studio log:
Quote:
Command Lines Creating temporary file "C:\DOCUME~1\HotChilli\LOCALS~1\Temp\BAT000002.bat" with contents
[
@echo off
make
if errorlevel 1 goto VCReportError
goto VCEnd
:VCReportError
echo Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
exit 1
:VCEnd
]
Creating command line "C:\DOCUME~1\HotChilli\LOCALS~1\Temp\BAT000002.bat"
Output Window Performing Makefile project actions
'make' is not recognized as an internal or external command,
operable program or batch file.
Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
Results Build log was saved at "file://d:\_nds\_Projects\Testo\vc-make\Debug\BuildLog.htm"
vc-make - 1 error(s), 0 warning(s)


Essential phrase is "'make' is not recognized as an internal or external command, operable program or batch file" Some troubles with enviroment variables in Visual Studio?

PS: When I set "cmd" or "regedit" instead "make" all works properly - commands call successful.

PS: Microsoft Development Enviroment 2003 - Version 7.1.3088.
Windows XP SP2.

#101557 - gmiller - Wed Sep 06, 2006 1:45 pm

To use the most recent devkitPro with Visual Studio I created the following batch steam based on the msys.bat.
Code:

@echo off
rem Copyright (C):  2001, 2002, 2003, 2004  Earnie Boyd
rem   mailto:earnie@users.sf.net
rem This file is part of Minimal SYStem
rem   http://www.mingw.org/msys.shtml
rem
rem File:       msys.bat
rem Revision:       2.2
rem Revision Date:  March 28th, 2004

rem ember to set the "Start in:" field of the shortcut.
rem A value similar to C:\msys\1.0\bin is what the "Start in:" field needs
rem to represent.

rem ember value of GOTO: is used to know recursion has happened.
if "%1" == "GOTO:" goto %2

if NOT "x%WD%" == "x" set WD=

rem ember command.com only uses the first eight characters of the label.
goto _WindowsNT

rem ember that we only execute here if we are in command.com.
:_Windows

if "x%COMSPEC%" == "x" set COMSPEC=command.com
start %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF

rem ember that we execute here if we recursed.
:_Resume
for %%F in (1 2 3) do shift
set WD=.\bin\

rem ember that we get here even in command.com.
:_WindowsNT

if "x%WD%" == "x" set WD=%~dp0\bin\

rem ember Set up option to use rxvt based on value of %1
if "x%MSYSCON%" == "x" set MSYSCON=rxvt.exe
if "x%1" == "x-norxvt" set MSYSCON=sh.exe
if "x%1" == "x--norxvt" set MSYSCON=sh.exe
if "x%MSYSCON%" == "xsh.exe" shift

if "x%MSYSTEM%" == "x" set MSYSTEM=MINGW32
if "%1" == "MINGW32" set MSYSTEM=MINGW32
if "%1" == "MSYS" set MSYSTEM=MSYS

if NOT "x%DISPLAY%" == "x" set DISPLAY=

if "x%MSYSCON%" == "xrxvt.exe" goto startrxvt
if "x%MSYSCON%" == "xsh.exe" goto startsh

:unknowncon
echo %MSYSCON% is an unknown option for msys.bat.
pause
exit 1

:notfound
echo Cannot find the rxvt.exe or sh.exe binary -- aborting.
pause
exit 1

rem If you don't want to use rxvt then rename the file rxvt.exe to something
rem else.  Then sh.exe will be used instead.
:startrxvt
if NOT EXIST %WD%rxvt.exe goto notfound

rem Setup the default colors for rxvt.
if "x%MSYSBGCOLOR%" == "x" set MSYSBGCOLOR=White
if "x%MSYSFGCOLOR%" == "x" set MSYSFGCOLOR=Black
if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=LightYellow
if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=Navy
if "%MSYSTEM%" == "MSYS" set BGCOLOR=%MSYSBGCOLOR%
if "%MSYSTEM%" == "MSYS" set FGCOLOR=%MSYSFGCOLOR%
if "%MSYSTEM%" == "MINGW32" set BGCOLOR=%MINGW32BGCOLOR%
if "%MSYSTEM%" == "MINGW32" set FGCOLOR=%MINGW32FGCOLOR%

rem set HOME=
rem env | grep Try
rem set | grep Try
rem pause

set HOME=%CD%

start %WD%rxvt -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i
exit

:startsh
if NOT EXIST %WD%\sh.exe goto notfound
start %WD%sh --login -i
exit

:EOF

rem ChangeLog:
rem 2002.03.07  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Move the @echo off to the top.
rem   * Change the binmode setting to nobinmode.
rem     * Remove the angle brackets around email address to workaround MS
rem   buggy command processor.
rem
rem 2002.03.12  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Add filter logic to find rxvt.exe
rem
rem 2002.03.13  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Revert the nobinmode change.
rem
rem 2002.03.20  Earnie Boyd  mailto:earnie@users.sf.net
rem     * Add logic for stating bash.
rem
rem 2002.04.11  Earnie Boyd  mailto;earnie@users.sf.net
rem   * Add logic for setting MSYSTEM value based on parameter.
rem
rem 2002.04.15  Olivier Gautherot  mailto:olivier_gautherot@mentorg.com
rem   * Reduce number test conditions for finding an executable.
rem
rem 2002.04.15  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Unset DISPLAY if set before starting shell.
rem
rem 2002.04.16  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Remove use of DEFINED in conditional statments for variables for
rem   command.com support.
rem   * Add check for nonexistance of USERNAME variable for Win9x support.
rem
rem 2002.04.17  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Add foreground and background color defaults based on MSYSTEM value.
rem
rem 2002.04.22  Earnie Boyd  mailto:earnie@users.sf.net
rem   * More Win 9x changes.
rem
rem 2002.05.04  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Remove the SET of USERNAME and HOME.
rem
rem 2002.11.18  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Add command.com detection and restart with a larger environment to
rem   avoid errors on w9x.
rem     Many thanks to Randy W. Sims mailto:RandyS@ThePierianSpring.org.
rem   See Randy's response to "RE: [Mingw-msys] Installation on WindowsME"
rem   from 11/06/2002 in the archives of mingw-msys@lists.sf.net.
rem
rem 2002.11.19  Paul Garceau  mailto:pgarceau@attbi.com
rem   * Fix a typo: Change COMPSPEC to COMSPEC.
rem
rem 2002.11.25  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Remove the SET CYGWIN since it doesn't matter any longer.
rem
rem 2003.02.03  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Win9x doesn't like ``EXISTS dir'' so change it to ``EXISTS dir\nul''.
rem   Thanks to Nicolas Weber mailto:nicolasweber@gmx.de.
rem
rem 2003.03.06  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Add -backspacekey switch to rxvt startup.
rem   * Move RXVT color setup to startrxvt label
rem
rem 2004.01.30  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Add -geometry parameter to work around an off by one issue with
rem       the default values.
rem   Thanks to Dave Schuyler mailto:parameter@users.sf.net
rem
rem 2004.03.28  Earnie Boyd  mailto:earnie@users.sf.net
rem   * Add -norxvt or --norxvt switch argument.
rem   Thanks to Keith Marshal mailto:Keith.Marshall@total.com.
rem   * Add method to determine absolute path of msys.bat so that we no
rem   longer need to change to the bin directory.  This allows msys.bat to be
rem   called from any working directory.
rem   Thanks to Kevin Mack  mailto:kevin.mack@us.cd-adapco.com
rem

So I could add the msys prompt from VS. Also you need to make sure that your path has the msys 'bin' directory at the first part of the path.

Like:
Code:

PATH = c:\devkitPro\msys\bin; (the rest of your path)


Hope this helps ...

#101558 - gmiller - Wed Sep 06, 2006 2:02 pm

To define the external command to get to msys in VS 2005:
tools->external tools->add
Code:

Title: msys command prompt
Command: C:\devkitPro\msys\VS_msys.bat
Arguments: $(SolutionDir)
Initial Directory: $(SolutionDir)

#101564 - HotChilli - Wed Sep 06, 2006 3:09 pm

gmiller wrote:
To define the external command to get to msys in VS 2005:
tools->external tools->add
Code:

Title: msys command prompt
Command: C:\devkitPro\msys\VS_msys.bat
Arguments: $(SolutionDir)
Initial Directory: $(SolutionDir)


Thanx. :) I have used batch file too as external tool. But my is little simpler and rough. :)

External Tool
Code:
start start.bat

Initial Directory: $(SolutionDir)

start.bat in solution root
Code:
make
@if errorlevel 1 pause
@if %errorlevel% == 0 call _Dualis\Dualis.exe _Result\TwinEngine.nds
exit

Dualis lies in project directory.

That's works. But... I want to use Makefile-project style too. :) Why this is don't work?... No idea. I try deleting and adding "Path" variable in "current user variables set". Uselessly. :(

Somebody use ds_project_template properly? Visual Studio don't see "make" command on my PC..

PS: I have installed Cygwin after devkitPro. Maybe it make some relevant changes... ?[/b]

#101577 - gmiller - Wed Sep 06, 2006 5:49 pm

Should be an issue I have both on my laptop as well. If it can't find make then the PATH variable is not correct since that is what it will 'search' for make. You could try echo'ing the current path.

in Windows:
Code:

echo %PATH%


in msys:
Code:

echo $PATH


Check to see it using that you can find your msys 'make'.

#101584 - Lick - Wed Sep 06, 2006 7:10 pm

Err.. Just create a makefile project and copy over the Makefile's from libnds template?
_________________
http://licklick.wordpress.com

#101615 - wintermute - Wed Sep 06, 2006 9:39 pm

The mys/bin path should be added to Visual Studio's executable file paths. Installing cygwin may interfere with devkitPro tools and should probably be avoided if possible.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#101624 - gmiller - Wed Sep 06, 2006 10:07 pm

cygwin does not set anything in the path so there should be nothing that causes a problem other than trying to build the projects from a cygwin environment. I have both on my machine and I have tested to be sure that they do not interfere with each other. If you use a cygwin command prompt or xterm then you WILL have problems.

#101625 - HotChilli - Wed Sep 06, 2006 10:10 pm

wintermute wrote:
The mys/bin path should be added to Visual Studio's executable file paths. Installing cygwin may interfere with devkitPro tools and should probably be avoided if possible.


Yeah! That's works! Thank you very much! He-he. ))

PS: So simple solution. ;)