Author Topic: Configuring mingw project in v22.0.2.1  (Read 11084 times)

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: Configuring mingw project in v22.0.2.1
« Reply #30 on: May 25, 2018, 04:01:46 AM »
Code: [Select]
C:\mingw32\bin\mingw32-make.exe
This path does exist, make is for some reason elsewhere:

Code: [Select]
C:\MinGW\msys\1.0\bin\make.exe
So when I run --version:

Code: [Select]
C:\Windows\System32>C:\MinGW\msys\1.0\bin\make.exe --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-msys

C:\Windows\System32>

Now I try to make manually, using this makefile:

Code: [Select]
all: Debug/test.o
C:/MinGW/bin/gcc.exe  -O0 -g3 -ggdb -p -pg -o "Debug/test.exe" Debug/test.o

Debug/test.o : test.c
C:/MinGW/bin/gcc.exe -c   -O0 -g3 -ggdb -p -pg -o "Debug/test.o"  test.c


It works:

Code: [Select]
k:\test>C:\MinGW\msys\1.0\bin\make.exe -f makefile
C:/MinGW/bin/gcc.exe -c   -O0 -g3 -ggdb -p -pg -o "Debug/test.o"  test.c
C:/MinGW/bin/gcc.exe  -O0 -g3 -ggdb -p -pg -o "Debug/test.exe" Debug/test.o

k:\test>

Here I show again the slickedit makefile, after all path modifications that doest work:

Code: [Select]
# SlickEdit generated file.  Do not edit this file except in designated areas.

# Make command to use for dependencies
MAKE=C:\MinGW\msys\1.0\bin\make.exe
RM=rm
MKDIR=mkdir

# -----Begin user-editable area-----

# -----End user-editable area-----

# If no configuration is specified, "Debug" will be used
ifndef CFG
CFG=Debug
endif

#
# Configuration: Debug
#
ifeq "$(CFG)" "Debug"
OUTDIR=Debug
OUTFILE=$(OUTDIR)/test.exe
CFG_INC=
CFG_LIB=
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/test.o
OBJ=$(COMMON_OBJ) $(CFG_OBJ)
ALL_OBJ=$(OUTDIR)/test.o

COMPILE=C:/MinGW/bin/gcc.exe -c -O0 -g3 -ggdb -p -pg -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=C:/MinGW/bin/gcc.exe -O0 -g3 -ggdb -p -pg -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE_ADA=gnat -g -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_ADB=gnat -g -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F=gfortran -c -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F90=gfortran -c -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_D=gdc -c -g -o "$(OUTDIR)/$(*F).o" "$<"

# Pattern rules
$(OUTDIR)/%.o : %.c
$(COMPILE)

$(OUTDIR)/%.o : %.ada
$(COMPILE_ADA)

$(OUTDIR)/%.o : %.d
$(COMPILE_D)

$(OUTDIR)/%.o : %.adb
$(COMPILE_ADB)

$(OUTDIR)/%.o : %.f90
$(COMPILE_F90)

$(OUTDIR)/%.o : %.f
$(COMPILE_F)

# Build rules
all: $(OUTFILE)

$(OUTFILE): $(OUTDIR) $(OBJ)
$(LINK)

$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"

# Rebuild this project
rebuild: cleanall all

# Clean this project
clean:
$(RM) -f $(OUTFILE)
$(RM) -f $(OBJ)

# Clean this project and all dependencies
cleanall: clean
endif

#
# Configuration: Release
#
ifeq "$(CFG)" "Release"
OUTDIR=Release
OUTFILE=$(OUTDIR)/test.exe
CFG_INC=
CFG_LIB=
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/test.o
OBJ=$(COMMON_OBJ) $(CFG_OBJ)
ALL_OBJ=$(OUTDIR)/test.o

COMPILE=gcc -c   -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=gcc  -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE_ADA=gnat -O -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_ADB=gnat -O -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F=gfortran -O -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F90=gfortran -O -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_D=gdc -c -g -o "$(OUTDIR)/$(*F).o" "$<"

# Pattern rules
$(OUTDIR)/%.o : %.c
$(COMPILE)

$(OUTDIR)/%.o : %.ada
$(COMPILE_ADA)

$(OUTDIR)/%.o : %.d
$(COMPILE_D)

$(OUTDIR)/%.o : %.adb
$(COMPILE_ADB)

$(OUTDIR)/%.o : %.f90
$(COMPILE_F90)

$(OUTDIR)/%.o : %.f
$(COMPILE_F)

# Build rules
all: $(OUTFILE)

$(OUTFILE): $(OUTDIR) $(OBJ)
$(LINK)

$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"

# Rebuild this project
rebuild: cleanall all

# Clean this project
clean:
$(RM) -f $(OUTFILE)
$(RM) -f $(OBJ)

# Clean this project and all dependencies
cleanall: clean
endif

Do you have any hints after this?



Dennis

  • Senior Community Member
  • Posts: 3965
  • Hero Points: 517
Re: Configuring mingw project in v22.0.2.1
« Reply #31 on: May 25, 2018, 02:15:23 PM »
I see you used the fully qualified path to msys/1.0/bin/make rather than just 'make', but I thought you had said you had the msys bin dir in your path already?

Does the other make (mingw32-make) work with your makefile?

Just to clarify, what is the result if you run msys/1.0.bin/make on the slickedit makefile ?

Also, try adding -v to the compile and link commands in the slickedit makefile.  This might give a better idea of what is failing with gcc.
« Last Edit: May 25, 2018, 02:17:05 PM by Dennis »

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: Configuring mingw project in v22.0.2.1
« Reply #32 on: May 25, 2018, 06:51:27 PM »
Ok... I am sorry I have wasted your time. My global PATH make != C:\MinGW\msys\1.0\bin\make.exe. The global make is from Code sourcery ARM package. Personally I think it should still work but whatever...

This doesnt fully solve my problem. If I run this mingw make manually with slickedit make file, it works:
Code: [Select]
k:\test>C:\MinGW\msys\1.0\bin\make.exe -f test.mak
C:/MinGW/bin/gcc.exe -c   -O0 -g3 -ggdb -p -pg -o "Debug/test.o"  test.c
C:/MinGW/bin/gcc.exe  -O0 -g3 -ggdb -p -pg -o "Debug/test.exe" Debug/test.o

But When I press build in slickedit, it doesnt:
Code: [Select]
K: & cd K:\test

K:\test>echo VSLICKERRORPATH="K:\test"
VSLICKERRORPATH="K:\test"

K:\test>"C:\Program Files\SlickEdit Pro 22.0.2\win\vsbuild" -signal 49541 -command make -f "K:\test\test.mak" CFG=Debug
 VSLICKERRORPATH="K:\test"
make -f K:\test\test.mak CFG=Debug
C:/MinGW/bin/gcc.exe -c -O0 -g3 -ggdb -p -pg -o "Debug/test.o"  test.c
make: *** [Debug/test.o] Error 1

K:\test>

This is the current makefile:
Code: [Select]
# SlickEdit generated file.  Do not edit this file except in designated areas.

# Make command to use for dependencies
MAKE=C:\MinGW\msys\1.0\bin\make.exe
RM=rm
MKDIR=mkdir

# -----Begin user-editable area-----

# -----End user-editable area-----

# If no configuration is specified, "Debug" will be used
ifndef CFG
CFG=Debug
endif

#
# Configuration: Debug
#
ifeq "$(CFG)" "Debug"
OUTDIR=Debug
OUTFILE=$(OUTDIR)/test.exe
CFG_INC=
CFG_LIB=
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/test.o
OBJ=$(COMMON_OBJ) $(CFG_OBJ)
ALL_OBJ=$(OUTDIR)/test.o

COMPILE=C:/MinGW/bin/gcc.exe -c -O0 -g3 -ggdb -p -pg -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=C:/MinGW/bin/gcc.exe -O0 -g3 -ggdb -p -pg -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE_ADA=gnat -g -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_ADB=gnat -g -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F=gfortran -c -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F90=gfortran -c -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_D=gdc -c -g -o "$(OUTDIR)/$(*F).o" "$<"

# Pattern rules
$(OUTDIR)/%.o : %.c
$(COMPILE)

$(OUTDIR)/%.o : %.ada
$(COMPILE_ADA)

$(OUTDIR)/%.o : %.d
$(COMPILE_D)

$(OUTDIR)/%.o : %.adb
$(COMPILE_ADB)

$(OUTDIR)/%.o : %.f90
$(COMPILE_F90)

$(OUTDIR)/%.o : %.f
$(COMPILE_F)

# Build rules
all: $(OUTFILE)

$(OUTFILE): $(OUTDIR) $(OBJ)
$(LINK)

$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"

# Rebuild this project
rebuild: cleanall all

# Clean this project
clean:
$(RM) -f $(OUTFILE)
$(RM) -f $(OBJ)

# Clean this project and all dependencies
cleanall: clean
endif

#
# Configuration: Release
#
ifeq "$(CFG)" "Release"
OUTDIR=Release
OUTFILE=$(OUTDIR)/test.exe
CFG_INC=
CFG_LIB=
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/test.o
OBJ=$(COMMON_OBJ) $(CFG_OBJ)
ALL_OBJ=$(OUTDIR)/test.o

COMPILE=gcc -c   -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=gcc  -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE_ADA=gnat -O -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_ADB=gnat -O -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F=gfortran -O -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F90=gfortran -O -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_D=gdc -c -g -o "$(OUTDIR)/$(*F).o" "$<"

# Pattern rules
$(OUTDIR)/%.o : %.c
$(COMPILE)

$(OUTDIR)/%.o : %.ada
$(COMPILE_ADA)

$(OUTDIR)/%.o : %.d
$(COMPILE_D)

$(OUTDIR)/%.o : %.adb
$(COMPILE_ADB)

$(OUTDIR)/%.o : %.f90
$(COMPILE_F90)

$(OUTDIR)/%.o : %.f
$(COMPILE_F)

# Build rules
all: $(OUTFILE)

$(OUTFILE): $(OUTDIR) $(OBJ)
$(LINK)

$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"

# Rebuild this project
rebuild: cleanall all

# Clean this project
clean:
$(RM) -f $(OUTFILE)
$(RM) -f $(OBJ)

# Clean this project and all dependencies
cleanall: clean
endif


Dennis

  • Senior Community Member
  • Posts: 3965
  • Hero Points: 517
Re: Configuring mingw project in v22.0.2.1
« Reply #33 on: May 25, 2018, 07:14:17 PM »
Ah, that finally clears things up.

You probably need to add the msys/1.0/bin path to your workspace PATH environment, or you could add that as a project open command, or you could just change to project tool for Build to use the fully qualified path to that make.

The make in your embedded toolkit directory probably did not understand MingW style paths (and possible not Windows style paths either).  There's a pretty good chance that all it understands is Cygwin paths.

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: Configuring mingw project in v22.0.2.1
« Reply #34 on: May 25, 2018, 07:52:31 PM »
I am not sure I can fit anything more in the PATH. If you look at my makefile, I have modified the MAKE variable, but that didnt change the make path. Could you tell me where I can xhange it for the project or whole slickedit?

Dennis

  • Senior Community Member
  • Posts: 3965
  • Hero Points: 517
Re: Configuring mingw project in v22.0.2.1
« Reply #35 on: May 25, 2018, 08:09:13 PM »
Project > Project Properties > Open tab
Code: [Select]
set PATH=C:\MingW\msys\1.0\bin\;%PATH%

You may need to close and re-open your project after making that change.

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: Configuring mingw project in v22.0.2.1
« Reply #36 on: May 25, 2018, 08:47:39 PM »
Still not there...
Code: [Select]
K: & cd K:\test

K:\test>echo VSLICKERRORPATH="K:\test"
VSLICKERRORPATH="K:\test"

K:\test>"C:\Program Files\SlickEdit Pro 22.0.2\win\vsbuild" -signal 49541 -command make -f "K:\test\test.mak" CFG=Debug
 VSLICKERRORPATH="K:\test"
make -f K:\test\test.mak CFG=Debug
vsbuild: File not found (make)

K:\test>

Cant this all be handled setting a compiler configuration somehow?

Dennis

  • Senior Community Member
  • Posts: 3965
  • Hero Points: 517
Re: Configuring mingw project in v22.0.2.1
« Reply #37 on: May 25, 2018, 08:52:42 PM »
Did you close the project and re-open it (to make the project open command run)?

From the Build window, type the command:
Code: [Select]
echo %PATH%
Is the correct msys path in there ?

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: Configuring mingw project in v22.0.2.1
« Reply #38 on: May 25, 2018, 08:59:21 PM »
Yes I did.
Isnt %PA a keyword for something? Look:
Code: [Select]
echo %PATH%
Nazwa 'TH%' nie jest rozpoznawana jako polecenie wewnętrzne lub zewnętrzne,
program wykonywalny lub plik wsadowy.

K:\test>

It says that 'TH%' is not recognized as anything. Not %PATH%.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6875
  • Hero Points: 530
Re: Configuring mingw project in v22.0.2.1
« Reply #39 on: May 26, 2018, 12:57:08 PM »
Weird. Did you type "echo %PATH%" after the path> prompt like below?

Code: [Select]
f:\temp>echo %PATH%
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\;... and tons more here

f:\temp>

If the above doesn't work, try "set PATH" which should dump your PATH and PATHEXT environment variable settings.
« Last Edit: May 26, 2018, 01:03:40 PM by Clark »

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: Configuring mingw project in v22.0.2.1
« Reply #40 on: May 26, 2018, 01:20:33 PM »
Ok, I had to press enter in Slickedit to get the prompt. Now In slickedit it returns:

Code: [Select]
K:\test>echo %PATH%
C:\MinGW\msys\1.0\bin\;ATH%;C:\Program Files\SlickEdit Pro 22.0.2\win\;.;

K:\test>

While in command line:

Code: [Select]
k:\>echo %PATH%
C:\Program Files\SlickEdit Pro 22.0.2\win\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\ImageMagick-7.0.2-Q16;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Comm
on Files\Intel\Shared Files\cpp\bin\Intel64;C:\Program Files (x86)\Microchip\MPLAB C30\bin;C:\Program Files (x86)\Microchip\xc16\v1.11\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Wi
ndows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;C:\Program Files (x86)\Secur
ity Innovation\SI TSS\bin\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Prog
ram Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\psshutdown;C:\Program Files (x86)\W
indows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microchip\xc16\v1.21\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Atmel\Atmel Studio 6.2\atbackend\
;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;B:\SysGCC\Raspberry\bin;C:\Program Files\SlikSvn\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;C:
\openocd-0.8.0\bin;C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2014q4\bin;B:\Program Files (x86)\SEGGER\JLink_V496;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Mi
crosoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;b:\Program Files (x86)\NTP\bin;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Bac
kburner\;b:\Program Files\doxygen\bin;C:\Program Files (x86)\CMake\bin;B:\Program Files (x86)\Calibre2\;B:\Program Files\TortoiseSVN\bin;K:\Dwimperl\perl\bin;K:\Dwimperl\perl\site\bin;c:\Dwimperl\perl
\bin;c:\Dwimp;C:\Program Files\MiKTeX 2.9\mikte;b:\Program Files (x86)\Atmel\sam-ba_2.12\drv\;b:\Program Files (x86)\Atmel\sam-ba_2.12;C:\SysGCC\Beaglebone\bin;c:\Program Files\mingw-builds\x64-4.8.1-
posix-seh-rev5\mingw64\bin;C:\Python27;b:\cygwin64\bin;B:\WinAVR-20100110\bin;C:\Program Files\WinRAR;C:/MinGW/bin;c:\MinGW\msys\1.0\bin

k:\>

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2899
  • Hero Points: 153
Re: Configuring mingw project in v22.0.2.1
« Reply #41 on: May 29, 2018, 02:39:02 PM »
What is your ComSpec environment variable set to?

bremenpl

  • Community Member
  • Posts: 90
  • Hero Points: 0
  • Electrical Engineer
Re: Configuring mingw project in v22.0.2.1
« Reply #42 on: May 29, 2018, 08:57:32 PM »
Quote
%SystemRoot%\system32\cmd.exe

and %SystemRoot% stands for C:\Windows

Dennis

  • Senior Community Member
  • Posts: 3965
  • Hero Points: 517
Re: Configuring mingw project in v22.0.2.1
« Reply #43 on: May 30, 2018, 02:12:04 PM »
I'm sorry, I gave you the wrong syntax for the environment variable in the Project Open options page.  Try this instead:

Project > Project Properties > Open tab

Code: [Select]
set PATH=C:\MingW\msys\1.0\bin\;%{PATH}
You will need to close and re-open SlickEdit after making that change (since your path in SlickEdit is already messed up).