[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bochs-dev
Subject:    Re: compiling bochs for win32
From:       Phillip Susi <phreak () iag ! net>
Date:       1999-10-27 3:06:46
[Download RAW message or body]

At 04:37 PM 10/26/99 -0400, you wrote:
>Phillip Susi wrote:
>> 
>> At 01:48 PM 10/26/99 -0400, you wrote:
>> >I implemented the COUNTER_INTERVAL issue by separating
>> >its definition out to the pc_system.cc file:
>> >
>> >  const Bit64u bx_pc_system_c::COUNTER_INTERVAL = 100000;
>> >
>> >rather than where it was declared.  This is the only
>> >place where it is used.  I'd imagine this is the
>> >legal C++ way to do this without using a macro.
>> 
>> Nope.  static members are just like globals, you have to declare them in
>> the header, and define them only in one module.  This should violate the
>> one definition rule if not be a compiler error, wich it is on VC ( though a
>> screwwy error message imho ).  You need to declare it in the class
>> definition without initialization, and define and initialize it in one and
>> only one .cpp module.
>
>
>This is what I did.  I split up the declaration (remains in the
>header without initialization) and the definition (moved to the .cc file
>with init).

The code you just described is, that's what I did to fix it, and how it is
supposed to be.  The original code that is listed above isnt.

>This seems to be exactly what you're saying to do.  Is the
>above code not legal?  Note that code above is in the .cc file.
>
>-Kevin
>

  -->Phillip Susi
     Phreak@iag.net


-- 
         To unsubscribe: mail bochs-developers-request@redhat.com with 
                       "unsubscribe" as the Subject.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic