I am working on MINIX 3. I changed the process scheduler and I want to do some testing there now.
The problem is that when I want to use double
I am getting an error. The interesting part is that if I declare and initialize a double variable
in the global in the class, it is not showing an error, but when I want to use that same double variable
inside a method, and try to compile MINIX 3 (version 3.1.6) I am getting this error:
/usr/lib/em_led: /usr/lib/i386/libc.a(exit.o): multiply defined (error)
Undefined:
_test_variable (<---- the name of the variable is "test_variable")
make in /usr/src/kernel: Exit code 1
make in /usr/src/tools: Exit code 1
make: made 'image' look old
This happens when I use the command make hdboot
in /usr/src/tools
, which I use after make install
Does anybody know what the problem here is?
EDITED
The code is:
FORWARD _PROTOTYPE( struct proc * pick_proc, (void));
FORWARD _PROTOTYPE( void enqueue_head, (struct proc *rp));
double test_variable;
//(the Variable **test_variable** one is Declared on TOP of the class after the Includes and after the declarations of the Methods
PRIVATE struct proc * pick_proc(void)
{
register struct proc *rp; /* process to run */
int q; /* iterate over queues */
int proceset;
proc_nr_t proci;
if (first_time == 1)
{
test_variable = 6.5;
}