Bonjour,
Je ne trouve pas pourquoi en compilant ce programme
J'obtiens :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 #include <stdio.h> #include <stdlib.h> main(){ int x; x=arc4random(); printf("%i\n", x); return 0; }
gcc -lbsd -o hello hello.cpp
hello.cpp: In function ‘int main()’:
hello.cpp:7:14: error: ‘arc4random’ was not declared in this scope
Sachant que "man arc4random" me donne :
NAME
arc4random, arc4random_buf, arc4random_uniform, arc4random_stir, arc4random_addrandom — arc4 random number generator
LIBRARY
Utility functions from BSD systems (libbsd, -lbsd)
SYNOPSIS
#include <bsd/stdlib.h>
...
...
Merci pour votre aide,
Lo
Partager