#306 closed defect (fixed)
psRandom.h not included in pslib.h
| Reported by: | Paul Price | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | types | Version: | 0.4.0 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
There is no #include line for psRandom.h in pslib.h (or its dependencies), which
leads to errors when compiling code that uses psRandom:
price@mithrandir:/home/mithrandir/price/testing>make
gcc -c -O0 -g -std=c99 -D_GNU_SOURCE
-I/home/mithrandir/price/psLib4/psLib/include/
-L/home/mithrandir/price/psLib4/psLib/lib/ testFFT.c
testFFT.c: In function `main':
testFFT.c:22: warning: initialization makes integer from pointer without a cast
testFFT.c:25: `psRandom' undeclared (first use in this function)
testFFT.c:25: (Each undeclared identifier is reported only once
testFFT.c:25: for each function it appears in.)
testFFT.c:25: `rng' undeclared (first use in this function)
testFFT.c:25: warning: implicit declaration of function `psRandomAlloc'
testFFT.c:25: `PS_RANDOM_TAUS' undeclared (first use in this function)
testFFT.c:26: warning: implicit declaration of function `psRandomUniform'
make: * [testFFT.o] Error 1
price@mithrandir:/home/mithrandir/price/psLib4/psLib/include>grep psRandom.h *.h
psRandom.h:/ @file psRandom.h
tst_psRandom.c includes psRandom.h explicitly, which does not suitably mimic the
true situation where the developer only includes pslib.h.
Workaround is to #include psRandom.h explicitly.
Change History (3)
comment:1 by , 21 years ago
| Status: | new → assigned |
|---|
comment:2 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |

added psRandom.h to psLib.h, as suggested and removed any includes of
psRandom.h from the test code.