----- Oorspronkelijk bericht ----- 
Van: "John Boik" <[EMAIL PROTECTED]>
Aan: <[EMAIL PROTECTED]>
Verzonden: vrijdag 27 juni 2003 22:30
Onderwerp: [GnuWin32-Users] newbie question on getting GSL to work with
mingw32


> Hi.  After hours and hours of trying, Im writing to the list hoping to get
> some clarification for this newbie on getting GSL to work under
> windows/mingw32.
>
> I have downloaded and installed MSYS and mingw32, and have downloaded the
> GNUWin32 version 1.0 of GSL.  But I am stuck.  Where do I place the GSL?
I
> know somewhere it says to place it in the program files path, but the GSL
> documentation says that it belongs in the  /usr/local/include/gsl path,
> which in the windows case I assume would be within the MSYS directory
> structure.  Is that correct?  And whereever I place it, how do I tell
> windows (or MSYS) that it is even there?  Do I need to put it into the
> windows path statement, or some sort of path statement used by MSYS?  Does
> MSYS have some sort of update function when you change directory
structures?
>

DLL's should be somewhere in the Path or in the current directory.
Libraries (*.a and *.dll.a) should be in the default library search path
(usually something like c:/mingw/mingw32/lib) or the directory they're in
should be given with the appropriate option (-L for GCC).

> Next, when compiling a C code, how do I link using the dlls?  Or do I link
> using the libgsl.a files?  I could really use some simple, complete, easy
to
> follow instructions on this.  It is very confusing to me, and the manuals
> that came with GSL etc are not of too much help.  I have read the one page
> discussion on linking in the GSL manual many times.  It assumes I know
much
> more than I do and it does not give an example of using a dll.  I am just
a
> beginner and would really appreciate some help so that I could use GSL.

You link in the same way as ordinary libraries. GCC automatically uses the
import library for the dll if it's available.
See also http://www.mingw.org/docs.shtml#etc

>
> Also, must I use the 1.0 version of GSL available at the mingw32 site or
can
> I compile my own so that I can use the latest version?  Is compiling the
new
> version just a matter of downloading the source files and issuing the
> appropriate make commands, etc?  Or are there certain things in the unix
> version of the GSL source code that do not port directly into compiling it
> under mingw32.  Similarly, are there some functions of GSL that are not
> available in the mingw32 version?
>
You can compile your own version. Look for a file named Gnuwin32-gsl-*.diffs
in the root directory of the source of Gsl as distributed on Gnuwin32, for
any differences with the original distribution. See also
http://gnuwin32.sourceforge.net/compile.html
Since there is also a Visual C++ release of Gsl, it is probably fairly
portable.

> Must I also download the header files if I want to write a C program that
> uses GSL functions?  What directory should I place them in?  How does MSYS
> or windows know that they are there?
>
Yes. But it is not Msys or Windows that finds them, but GCC or whatever
compiler you are using. So place them in the folder that is in the Include
search path of your compiler.

> Is WSYS the only interface to mingw32?  It is funny to me, but in the web
> instructions to mingw32 it says to install it and type in some test
> commands.  But where are you to type them in??  Into a dos prompt?  Into
the
> WSYS shell?  The web page gives you no clue.  Does mingw32 have its own
> shell?
>
Use either a bash shell (from Msys, Cygwin or Djgpp) or an MS-Windows shell
(command.com or cmd.exe).

> Lastly, I understand that it may be easier to get GSL to work with cygwin.
> But I also read that the executables made under cygwin are slower.  Does
> anyone know how much slower they are, in general?  10x?  1,000x? 2x?
Also,
> how much slower might GSL run under mingw32 as compared to running it
under
> Linux?
>
Cygwin provides a Unix emulation layer for MS-Windows. So if you develop
programs for Cygwin, anyone who uses your program, must install Cygwin. In
itself this isn't too complicated, but they must keep up with new releases
and also Cygwin binaries do not always work well together with native
binaries. Of course, if you develop only for personal use, then this may be
less of a problem.
The Cygwin emulation layer adds some overhead, and especially on slower
machines or with console output the differences may be noticeable. Of
course, with very complicated programs or algorithms the differences may be
much larger.

Kees Zeelenberg



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
GnuWin32-Users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to