I would like to build io_lib for Windows and am looking for advice on how to do it. I am a unix/perl person and have never compiled C code on Windows before. Where does one find a (good, free) C compiler for Windows? Can I use Cygwin to make a general purpose dll?
The reason I want it is that the most recent release of the Generic Genome Browser incorporated a trace viewer glyph which requires io_lib, and up until now, GBrowse has been perfectly cross platform. I would like to keep it that way by 'proving' that io_lib can be built for Windows.
Thanks much for any help,
Just to follow up a little bit: I installed cygwin and tried ./configure; make and got this output:
make: Entering directory `/home/scott/io_lib-1.9.2'
Making all in read
make: Entering directory `/home/scott/io_lib-1.9.2/read'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../include -I../read -I../alf -I../abi -I../ctf -I../ztr -I../plain -I../scf -I../sff -I../exp_file -I../utils -I/usr/local/include -g -O2 -MT Read.o -MD -MP -MF ".deps/Read.Tpo" -c -o Read.o Read.c; \
then mv -f ".deps/Read.Tpo" ".deps/Read.Po"; else rm -f ".deps/Read.Tpo"; exit 1; fi
In file included from Read.h:43,
../utils/os.h:346:2: #error Must define SP_BIG_ENDIAN or SP_LITTLE_ENDIAN in Makefile
make: *** [Read.o] Error 1
make: Leaving directory `/home/scott/io_lib-1.9.2/read'
make: *** [all-recursive] Error 1
make: Leaving directory `/home/scott/io_lib-1.9.2'
make: *** [all] Error 2
So I probably can give a flag to ./configure to get the endian-ness right in the Makefile. Any suggestions?
Try using mingw and msys instead for your compiler and build environment. Typically they behave much better than cygwin and indeed it's what I use for the windows builds.
Eg cygwin changes pathnames like c:/fu/bar to /cygdrive/c/fu/bar, which tends to confuse a lot of programs and users alike.
Did you define the appropriate endianness constant in the makefile as the message says?
Windows is little endian.
Personally I'd just create a visual C++ project by adding all the C files for the appropriate formats you want and doing a build that way.
You can download a free compiler from microsoft, it's called visual C++ express edition.
I might have a go myself over the next few days and see what happens :)
I managed to build I/O lib on windows, however it wasn't the trivial exercise I had hoped for.
The correct endianness is defined automatically when it detects that a microsoft compatible compiler is used (I think _MSCVER or similar is defined).
There are files missing, namely unistd.h and stdint.h, however I managed to find one of them in the staden package source, the other I just invented when the compiler complained about missing types.
Anyway, I used Visual C++ Express 2005, which is free from microsoft, created a new project and added all the c files. All the h files I put into a directory called include.
I also needed to download the latest version of ZLIB and link in that as well.
So with the appropriate fiddling, it's possible. Since I've done all the hard work let me know if you want some binaries.
> "Since I've done all the hard work let me know if you want some binaries"
Yes, I'd like to ask you about binaries.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.