From: Paul G. <pga...@my...> - 2002-01-17 01:10:09
|
Hi folks, ----- Original Message ----- From: Tor Lillqvist <tm...@ik...> Date: Wednesday, January 16, 2002 3:36 pm Subject: [Mingw-users] Help of sys files used on cygwin > Jianguo Wang writes: > > A program is complied well under cygwin. But when I compile it > under the > > newest version of mingw32, the error is that: strings.h > sys/times.h and > > param.h are not available. How can I deal with that? Fact is that you are attempting to port a Cygwin app to Mingw. The two are only truly compatible if you are using C language for your programming. As per my earlier suggestion, use MSYS. If you are going to port a cygwin app to mingw, you might as well use the enivironment that is most conducive to such a port. In the case of Mingw GCC, that is MSYS (see my earlier replies). You will still run in to problems with the runtime unless you start researching exactly which header files you are needing in order to support your port and "why?". Questions such as "What is the difference between strings.h and string.h?" can be easily answered if you take the risk of telling your Windows OS to stop hiding file name extensions and start actually reading through some of the files mentioned -- eg. the differences between strings.h and string.h is: (fill in the blanks for yourself after finding, ie. searching for, and reading the actual .h files you are wondering about). Also, bear in mind that this list is for end-user support for Mingw. It is not set up to teach anyone how to program in C or C++. For that you will need to do a search on the web, or find a good C/C+ programming book. In other words, the assumption here, on the Mingw-users mailing list, is that you have at least a basic understanding of why and how a "helloworld" program actually functions the way that it does and why you might include a specific header file to enhance the functionality of that "helloworld" executable. If you aren't sure what the difference is between an "executable" and a "library" or why you need such things, then you should bring that question to one of the C/C++ programming mailing lists/news groups that are out there on the web. [snip] > Oh, seriously... in general, there is no reason to expect that a > program which builds under Cygwin would build under mingw. Cygwin > tries hard to look like a kind of Unix, while mingw (or actually, the > Microsoft C library msvcrt.dll) provides only ANSI C functionality > (with a few easily implemented Unixish functions like open/read/close > added, and a few more like opendir/readdir/etc added by a > mingw-specific library). > > If the program uses Unix functionality not provided by the > Microsoft C > library you will have to port it to use what Windows provides. > > (But at first, you could try to replace strings.h with string.h, > sys/times.h with time.h and remove sys/param.h. Probably that will > only mean lots of other compilation errors, though...) Paul G. |
From: Wu Y. <ad...@ne...> - 2002-01-18 02:04:04
|
1) A simple answer would be no. MSYS handles ./configure and make, but not function calls. 2) Why not try it yourself? It may or may not, which depends on your project. Only you will know the result. However, IMHO, I will not expect it shall succeed. More likely than not your project used POSIX functions that MinGW does not support. Remember, MinGW does not support POSIX as Cygwin does. Do not expect it to do something it cannot. If you really do not want to use Cygwin, you will have to find out what functions are missing and provide the code yourself. Best regards, Wu Yongwei --- Original Message from Jianguo Wang <jw...@bi...> --- Thanks all the replies concerning my question. My situation is I have a big project with make file at hand, which is compiled under cygwin. But right now I want to use it without bothering any sygwin stuff. So when I try to compile it under mingw32 the problem is thaoese three header files. I do not think I can understand the details in the project, so I am wondering: 1) Can MSYS still handle this? 2) How about I just copy these three files from cygwin to mingw32? Will that work? Sorry for this silly question. Jianguo |
From: Jianguo W. <jw...@bi...> - 2002-01-17 15:55:00
|
Thanks all the replies concerning my question. My situation is I have a big project with make file at hand, which is compiled under cygwin. But right now I want to use it without bothering any sygwin stuff. So when I try to compile it under mingw32 the problem is thaoese three header files. I do not think I can understand the details in the project, so I am wondering: 1) Can MSYS still handle this? 2) How about I just copy these three files from cygwin to mingw32? Will that work? Sorry for this silly question. Jianguo ----- Original Message ----- From: "Paul Garceau" <pga...@my...> To: <min...@so...> Sent: Wednesday, January 16, 2002 8:08 PM Subject: Re: [Mingw-users] Help of sys files used on cygwin > Hi folks, > > ----- Original Message ----- > From: Tor Lillqvist <tm...@ik...> > Date: Wednesday, January 16, 2002 3:36 pm > Subject: [Mingw-users] Help of sys files used on cygwin > > > Jianguo Wang writes: > > > A program is complied well under cygwin. But when I compile it > > under the > > > newest version of mingw32, the error is that: strings.h > > sys/times.h and > > > param.h are not available. How can I deal with that? > > Fact is that you are attempting to port a Cygwin app to Mingw. The > two are only truly compatible if you are using C language for your > programming. As per my earlier suggestion, use MSYS. If you are going > to port a cygwin app to mingw, you might as well use the enivironment > that is most conducive to such a port. In the case of Mingw GCC, that > is MSYS (see my earlier replies). > You will still run in to problems with the runtime unless you start > researching exactly which header files you are needing in order to > support your port and "why?". > > Questions such as "What is the difference between strings.h and > string.h?" can be easily answered if you take the risk of telling your > Windows OS to stop hiding file name extensions and start actually > reading through some of the files mentioned -- eg. the differences > between strings.h and string.h is: (fill in the blanks for yourself > after finding, ie. searching for, and reading the actual .h files you > are wondering about). > > Also, bear in mind that this list is for end-user support for Mingw. > It is not set up to teach anyone how to program in C or C++. For that > you will need to do a search on the web, or find a good C/C+ programming > book. In other words, the assumption here, on the Mingw-users mailing > list, is that you have at least a basic understanding of why and how a > "helloworld" program actually functions the way that it does and why you > might include a specific header file to enhance the functionality of > that "helloworld" executable. > If you aren't sure what the difference is between an "executable" and > a "library" or why you need such things, then you should bring that > question to one of the C/C++ programming mailing lists/news groups that > are out there on the web. > > [snip] > > > Oh, seriously... in general, there is no reason to expect that a > > program which builds under Cygwin would build under mingw. Cygwin > > tries hard to look like a kind of Unix, while mingw (or actually, the > > Microsoft C library msvcrt.dll) provides only ANSI C functionality > > (with a few easily implemented Unixish functions like open/read/close > > added, and a few more like opendir/readdir/etc added by a > > mingw-specific library). > > > > If the program uses Unix functionality not provided by the > > Microsoft C > > library you will have to port it to use what Windows provides. > > > > (But at first, you could try to replace strings.h with string.h, > > sys/times.h with time.h and remove sys/param.h. Probably that will > > only mean lots of other compilation errors, though...) > > Paul G. > > > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > |