with the full cygwin install i.e the cross compile tools. To get the executable file for linux it is a simple matter of invoking the cross compiler in cygwin like
gcc-linux -o output input.c
How can we set this up in codeblocks environment?
to use the cygwin gcc we simply have to locate to the exact version of gcc which we want to use and set it in toolchain executables
like for cygwin c++ compiler C:\cygwin\bin\g++-4.exe
.
But the cross compile tools have the linux compiler as gcc-linux which is not an exe file
So how do we set this up with codeblocks?
@Morten
you are right about the path's aspect. i have checked the path of the files being called and i nagivated to the exe to this folder.
C:\cygwin\opt\crosstool\i686-unknown-linux-gnu\gcc-2.95.3-glibc-2.1.3\bin
and set the compiler tool chain to the exes in this folder. i.e
cpp.exe
gcov.exe
gdb.exe
i686-unknown-linux-gnu-addr2line.exe
i686-unknown-linux-gnu-ar.exe
i686-unknown-linux-gnu-as.exe
i686-unknown-linux-gnu-c++.exe
i686-unknown-linux-gnu-c++filt.exe
i686-unknown-linux-gnu-g++.exe
i686-unknown-linux-gnu-gcc.exe
i686-unknown-linux-gnu-gprof.exe
i686-unknown-linux-gnu-ld.exe
i686-unknown-linux-gnu-nm.exe
i686-unknown-linux-gnu-objcopy.exe
i686-unknown-linux-gnu-objdump.exe
i686-unknown-linux-gnu-protoize.exe
i686-unknown-linux-gnu-ranlib.exe
i686-unknown-linux-gnu-readelf.exe
i686-unknown-linux-gnu-size.exe
i686-unknown-linux-gnu-strings.exe
i686-unknown-linux-gnu-strip.exe
i686-unknown-linux-gnu-unprotoize.exe
make.exe
windres.exe
But the build fails.
-------------- Build: Debug in greet ---------------
[ 50.0%] Compiling: main.c
Execution of 'i686-unknown-linux-gnu-gcc.exe -Wall -g -c D:/Aditya/cppnix/greet/main.c -o obj/Debug/main.o' in 'D:\Aditya\cppnix\greet' failed.
Nothing to be done.
I did try with the make,windres and gdb from the mingw folders. and only the compilers pointing towards crosscompile exes. even that did not work.
I have both mingw and cygwin set up.