Skip to content

Build Error Omnet 5.0 #140

Description

@dhavalkvaria

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions