RoBoardLab
19.02.2014, 15:22 |
DJGPP cross compilers (Announce) |
We have built DJGPP under Windows, Linux, and Mac OS X based on Andris Pavenis' DJGPP source packages. We upload the prebuilt binaries for everyone being interested in trying them 
https://github.com/andrewwutw/build-djgpp/releases |
RayeR

CZ, 23.02.2014, 04:33
@ RoBoardLab
|
DJGPP cross compilers |
Hi, I tested the mingw32-standalone version and I have some problem with paths. I setup the system path for:
PATH=N:\DJGPP\BIN;N:\DJGPP\i586-pc-msdosdjgpp\BIN;
N:\DJGPP\LIBEXEC\GCC\i586-pc-msdosdjgpp\4.8.2;%PATH%
and it was unable to compile simple test program
1) it didn't find header files
TESTGCC.C:9:19: error: no include path in which to search for stdio.h
#include <stdio.h>
so I added -I../i586-pc-msdosdjgpp/sys-include/
2) it didn't find libs .a and .o
ld: cannot find crt0.o: No such file or directory
ld: cannot find -lgcc
ld: cannot find -lc
ld: cannot find -lgcc
So I had to add -L../i586-pc-msdosdjgpp/LIB/ -L../LIB/GCC/i586-pc-msdosdjgpp/4.8.2/
but it still cannot find crt0.o even if it is placed in ../i586-pc-msdosdjgpp/LIB/ I must copy it to current directory together with source file. Then finally a binary was compiled.
Good job but can you explain how to setup paths correctly or fix it if it's a bug?
N:\DJGPP>gcc -print-search-dirs
install: n:\djgpp\i586-pc-msdosdjgpp\bin\../lib/gcc/i586-pc-msdosdjgpp/4.8.2/
programs: =n:/djgpp/i586-pc-msdosdjgpp/bin/../libexec/gcc/i586-pc-msdosdjgpp/4.8
.2/;n:/djgpp/i586-pc-msdosdjgpp/bin/../libexec/gcc/;n:/djgpp/i586-pc-msdosdjgpp/
bin/../lib/gcc/i586-pc-msdosdjgpp/4.8.2/../../../../i586-pc-msdosdjgpp/bin/i586-
pc-msdosdjgpp/4.8.2/;n:/djgpp/i586-pc-msdosdjgpp/bin/../lib/gcc/i586-pc-msdosdjg
pp/4.8.2/../../../../i586-pc-msdosdjgpp/bin/
libraries: =n:/djgpp/i586-pc-msdosdjgpp/bin/../lib/gcc/i586-pc-msdosdjgpp/4.8.2/
;n:/djgpp/i586-pc-msdosdjgpp/bin/../lib/gcc/;n:/djgpp/i586-pc-msdosdjgpp/bin/../
lib/gcc/i586-pc-msdosdjgpp/4.8.2/../../../../i586-pc-msdosdjgpp/lib/i586-pc-msdo
sdjgpp/4.8.2/;n:/djgpp/i586-pc-msdosdjgpp/bin/../lib/gcc/i586-pc-msdosdjgpp/4.8.
2/../../../../i586-pc-msdosdjgpp/lib/
N:\DJGPP>gcc -print-multi-os-directory
.
N:\DJGPP>gcc -print-multi-directory
.
N:\DJGPP>gcc -print-sysroot
(nothing)
--- DOS gives me freedom to unlimited HW access. |
RoBoardLab
24.02.2014, 10:42
@ RayeR
|
DJGPP cross compilers |
> Hi, I tested the mingw32-standalone version and I have some problem with
> paths. I setup the system path for:
Hi,
If you want to use short compiler executable name (like gcc, g++), you also have to set the environment variable GCC_EXEC_PREFIX .
In your case, it should be:
PATH=N:/DJGPP/i586-pc-msdosdjgpp/bin;%PATH%
set GCC_EXEC_PREFIX=N:/DJGPP/lib/gcc/
You can also see README.md in https://github.com/andrewwutw/build-djgpp
(In the section "Use DJGPP compiler?) |
RayeR

CZ, 25.02.2014, 02:05
@ RoBoardLab
|
DJGPP cross compilers |
> PATH=N:/DJGPP/i586-pc-msdosdjgpp/bin;%PATH%
> set GCC_EXEC_PREFIX=N:/DJGPP/lib/gcc/
Thanks, now it works fine. I tested compiled binary under dos 6.22 and seems no difference between binary produced by dos-djgpp, good work! --- DOS gives me freedom to unlimited HW access. |