Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ld.exe:Disabling relaxation: it will not work with multiple definiti (Read 477 times)
Kucky
Junior Member
**
Offline


Posts: 50
Location: Germany
Joined: Oct 12th, 2012
ld.exe:Disabling relaxation: it will not work with multiple definiti
Oct 2nd, 2014 at 8:45am
Print Post  
Hello,
I use the Lib "MPU6050" in a project. Everything works fine. 
But the MPU setup runs in the main (ino) file. The MPU data 
read from the main loop. (See MPU6050 example). 
I want the MPU6050-Lib in a separate project class 
to use.
Looks like this:
void IMUClass::init()   (from main setup)
{
    Serial.println(F("Initializing I2C devices..."));
    mpu.initialize();
etc.
}

void IMUClass::readMPU()(from main loop)
{
    mpuInterrupt = false;
    mpuIntStatus = mpu.getIntStatus();
    fifoCount = mpu.getFIFOCount();
etc.
}
If I all includes (MPU6050_9Axis_MotionApps41.h …), declarations and initializations in my class 
have defined, comes this message.
Compiling 'MPU9150_Test' for 'Arduino Mega 2560 or Mega ADK'
MPU9159Class.cpp.o:In function `MPU6050::dmpGetAccel(long*, unsigned 
char const*)'
MPU6050_9Axis_MotionApps41.h:dmpGetAccel(long*, unsigned char const*)'
MPU9150_Test.cpp.o:\MPU6050_9Axis_MotionApps41.h:636: first defined here
ld.exe:Disabling relaxation: it will not work with multiple definitions

I understand what the compiler says, but how do I disable the error?

The Libs
#include "MPU6050_9Axis_MotionApps41.h"
#include "helper_3dmath.h"
#include "I2Cdev.h"
located in the project directory. I work with VS + Visual Micro and Arduino IDE.

I'm really desperate. Cry
Regards
Willi
  
Back to top
 
IP Logged
 
Kucky
Junior Member
**
Offline


Posts: 50
Location: Germany
Joined: Oct 12th, 2012
Re: ld.exe:Disabling relaxation: it will not work with multiple definiti
Reply #1 - Oct 2nd, 2014 at 9:26am
Print Post  
This Topic was moved here from General Board [move by] Kucky.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint