I have perl/tk installed and working. I tried using c++/tk and had to change the #include path in the headers to find the tk.h and tcl.h. I tried compiling a simple c++ program with g++ to test that the headers are correct. the line i type at console is:
g++ test.c cpptk.cc cpptkbase.cc -o test.bin
I fixed all previous errors, except for the following.
cpptkbase.cc: In constructor ‘<unnamed>::Interp::Interp()’:
cpptkbase.cc:36: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc:42: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc:48: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘void<unnamed>::do_eval(const std::string&)’:
cpptkbase.cc:86: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘int callbackHandler(void*, Tcl_Interp*, int, Tcl_Obj* const*)’:
cpptkbase.cc:196: warning: deprecated conversion from string constant to ‘char*’
cpptkbase.cc:212: error: reference to ‘exception’ is ambiguous
/usr/include/c++/4.4/exception:60: error: candidates are: class std::exception
/usr/include/boost/exception/exception.hpp:177: error: class boost::exception
cpptkbase.cc:212: error: expected type-specifier before ‘exception’
cpptkbase.cc:212: error: expected ‘)’ before ‘const’
cpptkbase.cc:212: error: expected ‘{’ before ‘const’
cpptkbase.cc:212: error: expected initializer before ‘)’ token
cpptkbase.cc: In function ‘std::string Tk::details::addLinkVar(int&)’:
cpptkbase.cc:255: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘std::string Tk::details::addLinkVar(double&)’:
cpptkbase.cc:272: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘std::string Tk::details::addLinkVar(std::string&)’:
cpptkbase.cc:297: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘int Tk::details::getResultLen()’:
cpptkbase.cc:380: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘T Tk::details::getResultElem(int) [with T = int]’:
cpptkbase.cc:397: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc:404: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘T Tk::details::getResultElem(int) [with T = double]’:
cpptkbase.cc:421: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc:428: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘T Tk::details::getResultElem(int) [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]’:
cpptkbase.cc:445: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In member function ‘std::string Tk::details::Command::invoke() const’:
cpptkbase.cc:467: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In member function ‘Tk::details::Expr:
perator int() const’:
cpptkbase.cc:528: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In member function ‘Tk::details::Expr:
perator double() const’:
cpptkbase.cc:545: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In member function ‘T Tk::details::Params::get(int) const [with T = int]’:
cpptkbase.cc:610: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
cpptkbase.cc: In function ‘void Tk::deleteCallback(const std::string&)’:
cpptkbase.cc:695: error: invalid use of incomplete type ‘struct Tcl_Interp’
/usr/lib/perl5/Tk/pTk/tcl.h:456: error: forward declaration of ‘struct Tcl_Interp’
I checked the error in the file cpptkbase.cpp, but nothing is wrong. i'm using ubuntu 10.10 and the files i downloaded is:
cpptk.cc cpptk.h cpptkbase.cc cpptkbase.h cpptkoptions.x cpptkconstants.x
i'm stumped as to how to correct this error.