dwavesystems / dwavesystems/minorminer
C++ Build Error
- Dominant language
- Python
- Stars
- 54
- Forks
- 48
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 1
Description
**Description**
I am trying to follow the guides and build the example.cpp and I am getting a error that
```
object of abstract class type "MyCppInteractions" is not allowed:C/C++(322)
[example.cpp(32, 42): ]()pure virtual function "find_embedding::LocalInteraction::displayOutputImpl" has no overrider
[example.cpp(32, 42): ]()pure virtual function "find_embedding::LocalInteraction::displayErrorImpl" has no overrider
```
**To Reproduce**
Compile the example.cpp
`g++ example.cpp -std=c++11 -o example -pthread`
The output is
```
Starting build...
/usr/bin/g++ -fdiagnostics-color=always -g /home/minorminer/examples/example.cpp -o /home/minorminer/examples/example
/home/minorminer/examples/example.cpp: In function ‘int main()’:
/home/minorminer/examples/example.cpp:32:60: error: invalid new-expression of abstract class type ‘MyCppInteractions’
params.localInteractionPtr.reset(new MyCppInteractions());
^
/home/minorminer/examples/example.cpp:18:7: note: because the following virtual functions are pure within ‘MyCppInteractions’:
class MyCppInteractions : public find_embedding::LocalInteraction {
^~~~~~~~~~~~~~~~~
In file included from /home/minorminer/examples/../include/find_embedding/graph.hpp:21:0,
from /home/minorminer/examples/../include/find_embedding/find_embedding.hpp:23,
from /home/minorminer/examples/example.cpp:16:
/home/minorminer/examples/../include/find_embedding/util.hpp:111:18: note: virtual void find_embedding::LocalInteraction::displayOutputImpl(int, const string&) const
virtual void displayOutputImpl(int loglevel, const string&) const = 0;
^~~~~~~~~~~~~~~~~
/home/minorminer/examples/../include/find_embedding/util.hpp:114:18: note: virtual void find_embedding::LocalInteraction::displayErrorImpl(int, const string&) const
virtual void displayErrorImpl(int loglevel, const string&) const = 0;
^~~~~~~~~~~~~~~~
Build finished with error(s).
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.