using the Wire library in different cpp files

I have two i2c sensors that I want to read a compass and a nintendo wii accelerometer.
For each of them I created a separate class with .h and .cpp files.
If I use only one of them, everything is fine. But as soon as I want to use both, none of them works.
I tried using the global extern Wire variable, or separate TwoWire member in the classes.
I rearranged the code back and forth. Whatever I do, one of them works, but not both ar the same time.
It’s my first project with i2c sensors. Are there special constraints one have to keep in mind?

The calling code is more or less like this:

#include <Servo.h> 
#include <Wire.h>
#include "RangeScanner.h"
#include "Compass.h"
#include "Nunchuck.h"
#include "IntersemaBaro.h"
#include "cppfix.h"

static const size_t pinIRDist    =   3;
static const size_t pinLED       =  11; // needs to be PWM
static const size_t pinServo     =   3; // needs to be PWM
static const size_t pinCompasPwr =   2;
//#define USE_BARO

RangeScanner *rangescn = 0;
Compass      *compas   = 0;
Nunchuck     *nunchuck = 0;
Intersema::BaroPressure_MS5534C *baro = 0;
bool          doSendSerial = false;
bool          doSweepServo = false;
size_t        loopDelay    = 25;
char          tmptxt[128];

size_t readSerialString(char *txt, size_t bufsize);
void   evalCmdStr(char *txt);
void setup() 
    pinMode(pinCompasPwr, OUTPUT); 
    digitalWrite(pinCompasPwr, LOW);  
    digitalWrite(pinCompasPwr, HIGH);  
    Serial.begin(115200); // arduino bt has only this baud rate
//    Wire.begin();  // join i2c bus as for master
    rangescn = new RangeScanner(pinIRDist, pinServo); 
    compas   = new Compass(-90); // 90° heading correction for the proto board
    nunchuck = new Nunchuck();
#ifdef USE_BARO
    baro     = new Intersema::BaroPressure_MS5534C(4, 5, 6, 7);
void loop() 

    const int proximityAngle = rangescn->curr_pos();
    const int proximityValue = rangescn->raw_measure();
        rangescn->moveNextPos(); // move to the next scan position
    const bool nunchuckSuccess = nunchuck->receiveData();
    const int accelX   = nunchuck->accelX();
    const int accelY   = nunchuck->accelY();
    const int accelZ   = nunchuck->accelZ();
    const int compassHeading = compas->heading();
//    const int altitude = baro->getHeightCentiMeters();

    const int outputValue = map(proximityValue, 50, 700, 0, 255);
    analogWrite(pinLED, outputValue); 
    if(readSerialString(tmptxt, sizeof(tmptxt)))
        sprintf(tmptxt, "RA%dRV%d", proximityAngle, proximityValue);
        sprintf(tmptxt, "AX%dAY%dAZ%d", accelX, accelY, accelZ);
        sprintf(tmptxt, "CH%d", compassHeading);
#ifdef USE_BARO
        sprintf(tmptxt, "BH%d", altitude);

If I enable only one of the two macros (USE_ACCELERO and USE_COMPASS), I get correct values when moving the sensors around. But when both macros are enabled, all I get is like this:


I can move the sensors around, but the values don't change.

One observation that might be crucial that I can't explain is that if I use only one sensor, in which case i get correct results. If I then move the call Wire.begin(); from the constructor to the main sketch in front of the call to the constructor, my measures are gone. So, are there some caveats with using separate compilation units or the Wire library in special that I am not aware of?

I just moved all the i2c related code from the cpp's into the main pde file, producing monolithic spaghetti code. And guess what, now both sensors work at the same time. I can hardly believe that's the way to do it.