|
From: William S. <wil...@gm...> - 2010-11-25 08:20:05
|
Thanks again very much for the previous help. I am a scientist, not a programmer, and I know enough to get my scientific tasks done (presenting precisely controlled visual stimulus displays, sending triggers over the parallel port, and reading the serial port). I am trying to migrate from djgpp (a species of gnu c compiler) under DOS to mingw under Windows XP. Sorry for my questions. I really have looked and it is difficult to find the info I need. From: http://www.mingw.org/wiki/IncludePathHOWTO http://www.mingw.org/wiki/SpecsFileHOWTO it seems I have a few options. Under djgpp I did as follows, for a library I wrote called rand. I have djgpp\lib\src\rand\rand.c I have the source rand.c, the header rand.h, and the makefile there. In the makefile I have rand: rand.c gcc -c rand.c ar rvs librand.a rand.o del rand.o move librand.a \djgpp\lib copy rand.h \djgpp\include Then subsequently I put #include "rand" at the top of any program that uses it and put -lrand in my makefile when I compile it. First, I think that for mingw I need to put a "\" at the ends of the lines like so: rand: rand.c gcc -c rand.c \ ar rvs librand.a rand.o \ del rand.o \ move librand.a \djgpp\lib \ copy rand.h \djgpp\include By analogy, maybe in mingw I would do: move librand.a c:\mingw\lib \ copy rand.h c:mingw\include I am not at all sure about: ar rvs librand.a rand.o \ >From what I read, one possibility is to stick the libraries in c:\mingw\local or maybe c:\mingw\local\lib ? This seems nice, because it keeps my libraries separate from mingw's. Would mingw be smart enough to know to look there? Otherwise I guess I would need to set LIBRARY_PATH? How? How about the header files? Where do they go? c:\mingw\local c:\mingw\local\include ? Would mingw be smart enough to know to look there? Maybe there's an INCLUDE_PATH? Fiddling with Specs seems an option too, but it is too sketchy for me to figure out. Any tips appreciated!! Thanks very much Bill |