Web lists-archives.com

Re: [Mingw-users] newbie problem with make and drand48




[Sending plain text instead of html would make it much easier to reply.
And please post to
  mingw-users@xxxxxxxxxxxxxxxxxxxxx
instead of
  mingw-users@xxxxxxxxxxxx
so that people who "reply to all" don't accidentally send duplicates.
Thanks.]

On 2006-5-2 18:23 UTC, Lisa Crozier wrote:
>
> I am trying to get drand48() to work, and I found a thread on this page
> with instructions (copied below).  I got as far as downloading all the
> files, but can’t a) compile them manually without changing the code or
> b) compile with the Makefile given.  And c) even if I could compile
> them, I suspect they might not go into the right directory. I’ll
> describe these problems one at a time.

First of all, where did you find that advice? I googled for both
the first line
  "Just trying to migrate a chunk of C code from Irix cc to MinGW"
and the Subject
  "Newbie question" "Random Function" erf
but couldn't find the original reference. The header
>  > Subject: [Mingw-users] Newbie question -- Random Function? erf
makes it look like it was posted here, but I can't find it in the
mingw archives either. I would like to think that one of us would
have commented on it: there has to be a better way of generating
random numbers than trying to build a subset of newlib.

What are you trying to accomplish: why do you want drand48()? Would
any random-number generator suit your purposes? Do you need one
that's better than what the C standard library already provides?

If you're writing C++, then prefer the random-number library at
boost.org . If you're writing C, then look for code on the web.
Here's an example from a careful author
  http://www-cs-staff.stanford.edu/~knuth/programs/rng-double.c
which compiles fine with this simple command:
  gcc rng-double.c
If you want to port *nix applications without considering issues
like this, try cygwin, which uses newlib.

> a)       Compiling them manually gives me lots of declaration and parse
> error messages (listed below).  Are these really mistakes in the code,
> or am I missing something?

Hard to guess without being able to look at the code. Presumably
it's either nonportable or misconfigured.

> b)       This turns out to be more general problem with make.  When I
> type ‘make’, even for a more basic example of hello world, I get the
> error message “'make' is not recognized as an internal or external
> command, operable program or batch file. Compilation exited abnormally
> with code 1 at Mon May 01 15:27:05.”   This isn’t an Emacs problem,
> because it also happens from the command line.  Can anyone point me to
> instructions on how to get make to work?

For that to work, 'make' must be in a directory on your PATH.

> c)       Should I put these files straight into the “include”
> subdirectory in my MinGW directory, or can they be contained within
> several layers of subfolders (which is how they downloaded automatically)?

If you copy files like
>  ./include/math.h
into your MinGW directory, that'll probably ruin the installation
so that simple things will fail in astonishing ways. Prefer to keep
them in a different directory altogether.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users