-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstract class breaks compile for mbed LPC1768 #666
Comments
If I remove all #pragma once
#ifndef IALGORITHM_H
#define IALGORITHM_H
class IAlgorithm {
public:
virtual ~IAlgorithm() {};
virtual void Tick(float MeasuredPower) {};
virtual float GetDuty(void) {};
virtual float GetCurrent(void) {};
virtual void ResetTo(float ResetCurrent, float ResetDuty) {};
};
#endif It all links fine. Although to be able to use abstract classes would be a nice thing. All other compilers (for x86 that is) work fine. |
* develop: Version bump to 2.9.2 (issues #641, #645, #648, #652, #664, #665, #666, #671, #674) Fix issue with ARM mbed framework when abstract class breaks compile for LPC1768 // Resolve #666 Fix issue with ARM mbed framework and multiple definition errors on FRDM-KL46Z board // Resolve #641 List embedded boards in docs Fix multiple definition in mbed framework when using abstract class // Issue #641, #666 Add "stlink" as the default uploader for STM32 Discovery boards // Resolve #665 Implement grep serial ports for Windows Remove unused imports Minor improvements Fix PyLint's "misplaced-comparison-constant" Use $PROGNAME instead static name when looking for the firmware Update title of the article Add new articles Link Community Forums FAQ with Docs FAQ Grep for "/dev/cu.*" on OS X Skip grep search for serial ports on Windows machines Improve firmware uploading to Arduino Leonardo based boards Add MinGW to the PATH # Conflicts: # docs/index.rst # docs/platforms/creating_board.rst # docs/projectconf.rst # docs/userguide/platforms/cmd_install.rst # platformio/__init__.py # platformio/builder/scripts/atmelavr.py # platformio/builder/scripts/atmelsam.py # platformio/builder/scripts/frameworks/mbed.py
Thank you for the fix. I updated using pip to 2.9.4. Because it is easier and I saw the version bump. (And I'm lazy ;)) The project compiles fine now. I haven't had the chance to actually try the generated code (no hardware). Will do so Wednesday. |
Configuration
Operating system: Win 10 x64
PlatformIO Version (
platformio --version
): 2.9.1Description of problem
When building for LPC1768 target and when your code contains abstract classes (with pure virtual members), the following error occur (PlatformIO CLI, or Visual Studio)
Steps to Reproduce
platformio run
in Test/or
Actual Results
Expected Results
A properly compiled bin.
The mbed online compiler has no issues: http://i.imgur.com/0Tu2vWM.png
MSVC has no problems compiling this for x64.
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue: (Headers and other files are here: https://erayan.com/shared/Test.zip)
Some people suggested it had to do with specs files, but that goes way over my head.
The text was updated successfully, but these errors were encountered: