taowl2003 / bcui-emacs

Automatically exported from code.google.com/p/bcui-emacs
0 stars 0 forks source link

Can't compile grammar.cc #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. cd grammar
2. make

What is the expected output? What do you see instead?

I get the following errors running make:
g++ -g -I. -I/usr/local/include/link-grammar -c grammar.cc
grammar.cc:28:27: link-includes.h: No such file or directory
grammar.cc:32: error: `Dictionary' has not been declared
grammar.cc:33: error: `Parse_Options' has not been declared
grammar.cc:34: error: ISO C++ forbids declaration of `dict' with no type
grammar.cc:34: error: ISO C++ forbids declaration of `opts' with no type
grammar.cc: In function `int parseSentence(std::string&, int&, int&)':
grammar.cc:35: error: `Sentence' was not declared in this scope
grammar.cc:35: error: expected `;' before "sent"
grammar.cc:36: error: `Linkage' was not declared in this scope
grammar.cc:36: error: expected `;' before "linkage"
grammar.cc:40: error: `parse_options_set_disjunct_cost' was not declared in 
this scope
grammar.cc:41: error: `parse_options_set_min_null_count' was not declared in 
this scope
grammar.cc:42: error: `parse_options_set_max_null_count' was not declared in 
this scope
grammar.cc:43: error: `parse_options_set_islands_ok' was not declared in this 
scope
grammar.cc:44: error: `parse_options_set_panic_mode' was not declared in this 
scope
grammar.cc:45: error: `parse_options_reset_resources' was not declared in this 
scope
grammar.cc:50: error: `sent' was not declared in this scope
grammar.cc:50: error: `sentence_create' was not declared in this scope
grammar.cc:51: error: `sentence_split' was not declared in this scope
grammar.cc:52: error: `sentence_parse' was not declared in this scope
grammar.cc:56: error: `parse_options_timer_expired' was not declared in this 
scope
grammar.cc:62: error: `sentence_length' was not declared in this scope
grammar.cc:67: error: expected `;' before "linkage"
grammar.cc:68: error: `linkage' was not declared in this scope
grammar.cc:74: error: `sentence_get_nth_word' was not declared in this scope
grammar.cc:75: error: `sentence_nth_word_has_disjunction' was not declared in 
this scope
grammar.cc:83: error: `linkage' was not declared in this scope
grammar.cc:83: error: `linkage_delete' was not declared in this scope
grammar.cc: In function `int main()':
grammar.cc:95: error: `Dictionary' was not declared in this scope
grammar.cc:95: error: expected `;' before "dict"
grammar.cc:96: error: `Parse_Options' was not declared in this scope
grammar.cc:96: error: expected `;' before "opts"
grammar.cc:97: error: `Sentence' was not declared in this scope
grammar.cc:97: error: expected `;' before "sent"
grammar.cc:98: error: `Linkage' was not declared in this scope
grammar.cc:98: error: expected `;' before "linkage"
grammar.cc:101: error: `opts' was not declared in this scope
grammar.cc:101: error: `parse_options_create' was not declared in this scope
grammar.cc:102: error: `dict' was not declared in this scope
grammar.cc:102: error: `dictionary_create_lang' was not declared in this scope
grammar.cc:109: error: `parse_options_set_max_parse_time' was not declared in 
this scope
grammar.cc:122: error: `dictionary_delete' was not declared in this scope
grammar.cc:123: error: `parse_options_delete' was not declared in this scope

What version of the product are you using? On what operating system?

Just checked out the trunk here.

This is my current g++ version:
  g++ (GCC) 3.4.5 (mingw-vista special r3)

Please provide any additional information below.

Original issue reported on code.google.com by lennart....@gmail.com on 7 Aug 2010 at 1:40

GoogleCodeExporter commented 8 years ago
Hm, sorry... - my c++ fu is low. I realize I have to fix the include path in 
MakeFile. After doing that however still seems to be wrong. I get this output:

C:\emacs\grammar\bcui-emacs-read-only\grammar>make
g++ -g -I. -IC:\emacs\grammar\link42\include -c grammar.cc
In file included from C:/emacs/grammar/link42/include/link-includes.h:9,
                 from grammar.cc:28:
C:/emacs/grammar/link42/include/structures.h:89:1: warning: "assert" redefined
In file included from 
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cassert:48
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/debug/debu
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_a
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/char_
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ios:46,
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/ostream:45
                 from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:4
                 from grammar.cc:26:
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/assert.h:43:1: 
warning: this is the locati
tion
In file included from C:/emacs/grammar/link42/include/link-includes.h:9,
                 from grammar.cc:28:
C:/emacs/grammar/link42/include/structures.h:477:8: warning: extra tokens at 
end of #endif directive
grammar.cc: In function `int parseSentence(std::string&, Dictionary_s*&, 
Parse_Options_s*&)':
grammar.cc:50: error: invalid conversion from `const char*' to `char*'
grammar.cc:50: error:   initializing argument 1 of `Sentence_s* 
sentence_create(char*, Dictionary_s*
grammar.cc:51: error: `sentence_split' was not declared in this scope
grammar.cc:74: error: `sentence_get_nth_word' was not declared in this scope
grammar.cc:75: error: `sentence_nth_word_has_disjunction' was not declared in 
this scope
grammar.cc: In function `int main()':
grammar.cc:102: error: `dictionary_create_lang' was not declared in this scope
make: *** [grammar.o] Error 1

Original comment by lennart....@gmail.com on 7 Aug 2010 at 1:54

GoogleCodeExporter commented 8 years ago
Sorry for the late response (I need to get the email notifications set up 
correctly).

This program (and the Makefile) has not been really tested on different 
platforms with different compilers.  So I won't be surprised that MinGW won't 
work.  I'll try to modify the program to not use iostream, and see if that 
helps.

Thanks for reporting this issue!

Original comment by baoqiu@gmail.com on 19 Aug 2010 at 3:57

GoogleCodeExporter commented 8 years ago
hi,

was this issue ever resolved?  I'm trying to install under ubuntu 12.05

thanks,

dave

Original comment by dokag...@gmail.com on 20 Oct 2014 at 9:31