Skip to content

Build error gcc (GCC) 6.1.1 20160501 #46

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

Closed
heshamsafi opened this issue May 21, 2016 · 2 comments
Closed

Build error gcc (GCC) 6.1.1 20160501 #46

heshamsafi opened this issue May 21, 2016 · 2 comments

Comments

@heshamsafi
Copy link
Contributor

Hello,

first of all, this is a great compilation of non-trivial algorithms ... thank you for putting it together.

secondly, I get this build error for suffix_tree in my environment.
most probably compiler dependent issues.
I will look into it and if i fix it I will send a pull request from a fork.

In file included from src/suffix_tree_demo.cpp:1:0:
./include/suffix_tree.h: In member function ‘Iterator SuffixTree::inc_search(Iterator)’:
./include/suffix_tree.h:34:41: warning: typedef ‘T’ locally defined but not used [-Wunused-local-typedefs]
typedef typename Iterator::value_type T; // extract real type
^
./include/suffix_tree.h: In function ‘std::ostream& operator<<(std::ostream&, SuffixTree::Node&)’:
./include/suffix_tree.h:214:8: error: ‘typedef struct SuffixTree::Edge SuffixTree::Edge’ is private within this context
map<Edge*, bool>::iterator iter;
^~~~
./include/suffix_tree.h:149:22: note: declared private here
typedef struct Edge Edge;
^~~~
./include/suffix_tree.h:215:14: error: ‘typedef struct SuffixTree::Edge SuffixTree::Edge’ is private within this context
map<char, Edge*>::iterator iter_f;
^~~~
./include/suffix_tree.h:149:22: note: declared private here
typedef struct Edge Edge;
^~~~
src/suffix_tree_demo.cpp: At global scope:
src/suffix_tree_demo.cpp:107:70: error: no ‘SuffixTree::Node* SuffixTree::seperate_edge(SuffixTree::Node_, SuffixTree::Edge_)’ member function declared in class ‘SuffixTree’
SuffixTree::Node* SuffixTree::seperate_edge(Node * node, Edge* a_edge)
^
src/suffix_tree_demo.cpp:107:13: error: ‘typedef struct SuffixTree::Node SuffixTree::Node’ is private within this context
SuffixTree::Node* SuffixTree::seperate_edge(Node * node, Edge* a_edge)
^~~~
In file included from src/suffix_tree_demo.cpp:1:0:
./include/suffix_tree.h:81:22: note: declared private here
typedef struct Node Node;
^~~~
src/suffix_tree_demo.cpp:107:58: error: ‘typedef struct SuffixTree::Edge SuffixTree::Edge’ is private within this context
SuffixTree::Node* SuffixTree::seperate_edge(Node * node, Edge* a_edge)
^~~~
In file included from src/suffix_tree_demo.cpp:1:0:
./include/suffix_tree.h:149:22: note: declared private here
typedef struct Edge Edge;
^~~~
Makefile:257: recipe for target 'suffix_tree_demo' failed
make: *** [suffix_tree_demo] Error 1

heshamsafi added a commit to heshamsafi/algorithms that referenced this issue May 21, 2016
    include/suffix_tree.h :
        - fixed build errors ( access modifiers issue)
        - removed typedef struct ... as it is unnecessary in C++
    src/suffic_tree_demo.cpp :
        - fixed typo in function declaration name (seperate -> separate)
xtaci added a commit that referenced this issue May 21, 2016
@heshamsafi
Copy link
Contributor Author

resolved with #47.

@xtaci
Copy link
Owner

xtaci commented May 23, 2016

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants