When i debug with gdb this error comes: "srand (seed=18) at ../../../../../../../newlib/libc/stdlib/rand.c:67", "/newlib/libc/stdlib/rand.c: Datei oder Verzeichnis nicht gefunden", on my line : srand(++salz);
in this code
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pico/stdlib.h"
#include "hardware/spi.h"
#include "hardware/gpio.h"
#include "hardware/flash.h"
uint16_t salz=3;
void game_end(){
srand(++_salz); // rand.c is allways missing
int r = rand();
_figure = _figures[(r*3/11)%FIGURE_COUNT];
...
}
it confused me, runs with "_figure = _figures[(r/10)%FIGURE_COUNT];" but not with " _figure = _figures[(r*3/11)%FIGURE_COUNT];"
Is the missing rand.c a problem of the pico-sdk or of the developing maschine-OS?
the developing maschine is:
Raspberry Pi 3 Model B Rev 1.2
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
Please excuse my bad english, and thanks for awnsers