我对库进行了一些小的更改(只是.cpp,而不是.h),并且编译时更改没有生效。即使是古怪的错误也没有效果。
我在VS2015(我的正常环境),最新的Arduino IDE和1.6.5 IDE中尝试过。我还手动删除了.o文件。
.cpp在其他任何地方都不存在。控制台没有错误,完整的编译日志中没有任何有趣的事情发生。
我错过了什么或做错了什么?
的.cpp:
/*
* MozziGuts.cpp
*
* Copyright 2012 Tim Barrass.
*
* This file is part of Mozzi.
*
* Mozzi by Tim Barrass is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
*
*/
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#ifdef EAC
#include <SPI.h>
#endif
...
·H:
/*
* MozziGuts.h
*
* Copyright 2012 Tim Barrass.
*
* This file is part of Mozzi.
*
* Mozzi by Tim Barrass is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
*
*/
#ifndef MOZZIGUTS_H_
#define MOZZIGUTS_H_
//#define F_CPU 8000000 // testing
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#ifdef EAC // Euro
#include <SPI.h>
#endif
#include "mozzi_analog.h"
...
.ino:
/* Plays a fluctuating ambient wash,
using Mozzi sonification library.
Demonstrates audio and control rate updates.
There are 8 oscillators updated at control rate to set
the volume of 8 audio oscillators. Updating the volume
at control rate saves processor time, incrementing the
Oscils only 128 times per second rather than at the
audio rate of 16384 Hz.
Circuit: Audio output on digital pin 9 on a Uno or similar, or
DAC/A14 on Teensy 3.1, or
check the README or http://sensorium.github.com/Mozzi/
Mozzi help/discussion/announcements:
https://groups.google.com/forum/#!forum/mozzi-users
Tim Barrass 2012, CC by-nc-sa.
*/
//#include <ADC.h> // Teensy 3.1 uncomment this line and install http://github.com/pedvide/ADC
bool EACtest;
#define EAC
//#ifdef EAC
#include <SPI.h>
//#endif
#include <MozziGuts.h>
...
(我添加了SPI.h define / includes。)