Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error Omnet 5.0 #140

Open
dhavalkvaria opened this issue Oct 6, 2018 · 0 comments
Open

Build Error Omnet 5.0 #140

dhavalkvaria opened this issue Oct 6, 2018 · 0 comments

Comments

@dhavalkvaria
Copy link

Build Error Omnet 5.0

Trace of Build :
In file included from src/core/forwarding/StochasticForwardingPolicy.cpp:5:
include\StochasticForwardingPolicy.h:35:75: error: use of undeclared identifier 'time'; did you mean 'ftime'?
void initializeRandomNumberGenerator(unsigned int seed=((unsigned)time(0)));
^~~~
ftime
C:\Users\USER\src\omnetpp-5.0\tools\win32\mingw32\i686-w64-mingw32\include\sys/timeb.h:102:16: note: 'ftime' declared here
void __cdecl ftime (struct timeb *);
^
In file included from src/core/forwarding/StochasticForwardingPolicy.cpp:5:
include\StochasticForwardingPolicy.h:35:65: error: C-style cast from 'void' to 'unsigned int' is not allowed
void initializeRandomNumberGenerator(unsigned int seed=((unsigned)time(0)));
^~~~~~~~~~~~~~~~~
src/core/forwarding/StochasticForwardingPolicy.cpp:65:19: error: use of undeclared identifier 'random'; did you mean 'rand'?
return (float)random() / (float)RAND_MAX;
^~~~~~
rand
C:\Users\USER\src\omnetpp-5.0\tools\win32\mingw32\i686-w64-mingw32\include\stdlib.h:382:15: note: 'rand' declared here
int __cdecl rand(void);
^
3 errors generated./

Please help me to resolve this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant