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 (Solved)Sparkfun BME280 Project will not compile with VS ok with IDE (Read 2669 times)
Serial.Builder
Newbies
*
Offline


Posts: 8
Joined: Aug 9th, 2016
(Solved)Sparkfun BME280 Project will not compile with VS ok with IDE
Aug 9th, 2016 at 8:41am
Print Post  
Rather than hijack the other thread I thought I would make a new one.

the  sparkfun BME280 library (very new library) fails to compile using VMicro and VS but is fine with the Arduino IDE.

https://github.com/sparkfun/SparkFun_BME280_Arduino_Library

I2C_ReadAllData.ino  (in the examples) is spitting out this compile error.

FYI I renamed the files ... from I2C_ReadAllData to SparkFunBME280 but it's the same as below with the original filenames.

Code (C++)
Select All
sparkfunBME280.cpp.o:In function `setup
sparkfunBME280.ino:undefined reference to `BME280  begin()
sparkfunBME280.ino:undefined reference to `BME280  readRegister(unsigned char)
sparkfunBME280.ino:undefined reference to `BME280  readRegister(unsigned char)
sparkfunBME280.ino:undefined reference to `BME280  readRegister(unsigned char)
sparkfunBME280.ino:undefined reference to `BME280  readRegister(unsigned char)
sparkfunBME280.ino:undefined reference to `BME280  readRegister(unsigned char)
sparkfunBME280.cpp.o:In function `loop
sparkfunBME280.ino:undefined reference to `BME280  readTempC()
sparkfunBME280.ino:undefined reference to `BME280  readTempF()
sparkfunBME280.ino:undefined reference to `BME280  readFloatPressure()
sparkfunBME280.ino:undefined reference to `BME280  readFloatAltitudeMeters()
sparkfunBME280.ino:undefined reference to `BME280  readFloatAltitudeFeet()
sparkfunBME280.ino:undefined reference to `BME280  readFloatHumidity()
sparkfunBME280.cpp.o:In function `__static_initialization_and_destruction_0
sparkfunBME280.ino:undefined reference to `BME280  BME280()
collect2.exe*:error: ld returned 1 exit status 



I understand from the other thread that there is some kind of problem with the Arduino IDE ?

Is this correct or is it VMicro ?

Would love a solution in either case. 

Cheers,
« Last Edit: Aug 9th, 2016 at 9:26am by Serial.Builder »  
Back to top
 
IP Logged
 
Serial.Builder
Newbies
*
Offline


Posts: 8
Joined: Aug 9th, 2016
SOLVED: Sparkfun BME280 Project will not compile with VS ok with IDE
Reply #1 - Aug 9th, 2016 at 8:54am
Print Post  
I found out what I was doing wrong.
Cheesy
Tip to self and any others who are having problems.

DON'T manually add the .h file in VS ... then it's fine.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint