help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave-forge's rand.oct did not compile


From: Paul Kienzle
Subject: Re: octave-forge's rand.oct did not compile
Date: Wed, 12 Oct 2005 22:54:38 -0400

There are at least three places to look for these definitions:

#include <stdint.h>
#include <sys/types.h>
#include <inttypes.h>

I've changed the source of randmtzig.c on CVS to use

        #include <inttypes.h>

Please let me know if this works.

- Paul

On Oct 12, 2005, at 9:08 PM, Mike Miller wrote:

On Wed, 12 Oct 2005, John W. Eaton wrote:

On 12-Oct-2005, Mike Miller wrote:

| I'm not sure how much information you need.  I am using Red Hat and
| working from the octave-forge-2005.06.13. I want randp to work but I | guess it is a symlink to octave-forge's rand.oct, which is missing. When
| I try to compile octave-forge, I see this:
|
| rand.cc: In function `octave_value do_seed(octave_value_list)':
| rand.cc:48: syntax error before `=' token
| rand.cc:61: syntax error before `[' token
| rand.cc:82: syntax error before `=' token
| rand.cc:93: syntax error before `[' token
| rand.cc:95: syntax error before `(' token
| make[1]: *** [rand.oct] Error 1

If you look at the source, I think you will see that all the lines with errors are using types like uint32_t. What compiler are you using? Does it not recognize these (c99?) type names?

I'm using gcc/g++:

gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53)

I don't know what it recognizes but I'll bet you know!  ;-)

I just realized that I should have included more of the output. I had an earlier pair of errors related to "pdb", from extras, which is almost certainly irrelevant, but the stuff below may help you to figure out what is going wrong.

Thanks for getting back to me!

Mike


g++ -c -fPIC -I/home/mbmiller/local/include/octave-2.1.71 -I/home/mbmiller/local/include/octave-2.1.71/octave -I/home/mbmiller/local/include -mieee-fp -g -O2 -DHAVE_OCTAVE_21 -DALLBITS -DHAVE_ND_ARRAYS rand.cc -o rand.o
In file included from rand.cc:32:
randmtzig.c:185: syntax error before `*' token
randmtzig.c:186: syntax error before `[' token
randmtzig.c:192: `uint32_t' was not declared in this scope
randmtzig.c:192: syntax error before `)' token
randmtzig.c: In function `void init_by_int(...)':
randmtzig.c:195: `state' undeclared (first use this function)
randmtzig.c:195: (Each undeclared identifier is reported only once for each
   function it appears in.)
randmtzig.c:195: `s' undeclared (first use this function)
randmtzig.c: At global scope:
randmtzig.c:210: `uint32_t' was not declared in this scope
randmtzig.c:210: syntax error before `[' token
randmtzig.c: In function `void init_by_array(...)':
randmtzig.c:215: `key_length' undeclared (first use this function)
randmtzig.c:218: `init_key' undeclared (first use this function)
randmtzig.c: In function `void init_by_entropy()':
randmtzig.c:238: `uint32_t' undeclared (first use this function)
randmtzig.c:238: syntax error before `[' token
randmtzig.c:247: `entropy' undeclared (first use this function)
randmtzig.c: At global scope:
randmtzig.c:272: `uint32_t' was not declared in this scope
randmtzig.c:272: syntax error before `[' token
randmtzig.c: In function `void set_state(...)':
randmtzig.c:275: `save' undeclared (first use this function)
randmtzig.c:277: `next' undeclared (first use this function)
randmtzig.c: At global scope:
randmtzig.c:280: syntax error before `[' token
randmtzig.c: In function `void next_state()':
randmtzig.c:289: `p' undeclared (first use this function)
randmtzig.c: At global scope:
randmtzig.c:311: syntax error before `(' token
randmtzig.c:316: ISO C++ forbids declaration of `y' with no type
randmtzig.c:319: syntax error before `^=' token
randmtzig.c:320: syntax error before `^=' token
randmtzig.c:321: syntax error before `^=' token
randmtzig.c:339: syntax error before `(' token
randmtzig.c:342: syntax error before `=' token
randmtzig.c:354: syntax error before `(' token
randmtzig.c:357: syntax error before `=' token
randmtzig.c:369: syntax error before `(' token
randmtzig.c:372: syntax error before `=' token
randmtzig.c: In function `double randu32()':
randmtzig.c:387: `randmt' undeclared (first use this function)
randmtzig.c: In function `double randu53()':
randmtzig.c:394: ISO C++ forbids declaration of `uint32_t' with no type
randmtzig.c:394: uninitialized const `uint32_t'
randmtzig.c:394: syntax error before `=' token
randmtzig.c:395: ISO C++ forbids declaration of `uint32_t' with no type
randmtzig.c:395: redeclaration of `const int uint32_t'
randmtzig.c:394: `const int uint32_t' previously declared here
randmtzig.c:395: declaration of `const int uint32_t'
randmtzig.c:394: conflicts with previous declaration `const int uint32_t'
randmtzig.c:395: uninitialized const `uint32_t'
randmtzig.c:395: syntax error before `=' token
randmtzig.c:396: `a' undeclared (first use this function)
randmtzig.c:396: `b' undeclared (first use this function)
randmtzig.c: At global scope:
randmtzig.c:427: syntax error before `[' token
randmtzig.c:429: syntax error before `[' token
randmtzig.c: In function `void create_ziggurat_tables()':
randmtzig.c:484: `ki' undeclared (first use this function)
randmtzig.c:484: `uint64_t' undeclared (first use this function)
randmtzig.c:512: `ke' undeclared (first use this function)
randmtzig.c: In function `double randn()':
randmtzig.c:576: ISO C++ forbids declaration of `uint64_t' with no type
randmtzig.c:576: uninitialized const `uint64_t'
randmtzig.c:576: syntax error before `=' token
randmtzig.c:577: `r' undeclared (first use this function)
randmtzig.c: In function `double rande()':
randmtzig.c:621: `uint64_t' undeclared (first use this function)
randmtzig.c:621: syntax error before `=' token
randmtzig.c:622: `ri' undeclared (first use this function)
randmtzig.c: At global scope:
randmtzig.c:641: type specifier omitted for parameter `uint32_t'
randmtzig.c:641: syntax error before `*' token
randmtzig.c: In function `void fill_randi32(...)':
randmtzig.c:644: `n' undeclared (first use this function)
randmtzig.c: At global scope:
randmtzig.c:647: type specifier omitted for parameter `uint64_t'
randmtzig.c:647: syntax error before `*' token
randmtzig.c: In function `void fill_randi64(...)':
randmtzig.c:650: `randi64' undeclared (first use this function)
rand.cc: In function `octave_value do_seed(octave_value_list)':
rand.cc:48: syntax error before `=' token
rand.cc:61: syntax error before `[' token
rand.cc:82: syntax error before `=' token
rand.cc:93: syntax error before `[' token
rand.cc:95: syntax error before `(' token
make[1]: *** [rand.oct] Error 1



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]