Hey PARVINDER,
2011/6/17 PARVINDER RAJPUT <[email protected]>
> Hello Everyone,
> I have 10.04 version of ubuntu and also used wt-3.1.9. I am facing problem
> in WAnchor.
> code are:
>
> #include <Wt/WApplication>
> #include <Wt/WBreak>
> #include <Wt/WContainerWidget>
> #include <Wt/WText>
> #include <Wt/WAnchor>
> using namespace Wt;
>
> class HelloApplication : public WApplication
>
> {
> public:
> HelloApplication(const WEnvironment& env);
>
> };
> HelloApplication::HelloApplication(const WEnvironment& env)
> : WApplication(env)
> {
> setTitle("Parvinder"); // application title
> root()->addWidget(new WText("<h1>This is my officel website</h1> "));
> root()->addWidget(new WBreak());
>
>
> WAnchor *x = new Wt::WAnchor::WAnchor("http://www.webtoolkit.eu/", "Wt
> web toolkit", this);
>
replace
WAnchor *x = new Wt::WAnchor::WAnchor("http://www.webtoolkit.eu/", "Wt web
toolkit", this);
with
WAnchor *x = new Wt::WAnchor::WAnchor("http://www.webtoolkit.eu/", "Wt web
toolkit", root());
Please, note, that this question is not related to Wt. Please, learn C++.
>
> }
>
> WApplication *createApplication(const WEnvironment& env)
> {
>
> return new HelloApplication(env);
> }
>
> int main(int argc, char **argv)
> {
>
> return WRun(argc, argv, &createApplication);
> }
>
>
>
> it show the output:-
> [100%] Building CXX object hello1/CMakeFiles/hello.wt.dir/hello.o
>
> /usr/share/doc/witty-doc/examples/hello1/hello.C: In constructor
> ‘HelloApplication::HelloApplication(const Wt::WEnvironment&)’:
>
> /usr/share/doc/witty-doc/examples/hello1/hello.C:25: error: no matching
> function for call to ‘Wt::WAnchor::WAnchor(const char [26], const char [15],
> HelloApplication* const)’
>
> /usr/include/Wt/WAnchor:92: note: candidates are:
> Wt::WAnchor::WAnchor(Wt::WResource*, Wt::WImage*, Wt::WContainerWidget*)
>
> /usr/include/Wt/WAnchor:81: note:
> Wt::WAnchor::WAnchor(const std::string&, Wt::WImage*, Wt::WContainerWidget*)
>
> /usr/include/Wt/WAnchor:74: note:
> Wt::WAnchor::WAnchor(Wt::WResource*, const Wt::WString&,
> Wt::WContainerWidget*)
>
> /usr/include/Wt/WAnchor:64: note:
> Wt::WAnchor::WAnchor(const std::string&, const Wt::WString&,
> Wt::WContainerWidget*)
>
> /usr/include/Wt/WAnchor:60: note:
> Wt::WAnchor::WAnchor(Wt::WResource*, Wt::WContainerWidget*)
>
> /usr/include/Wt/WAnchor:51: note:
> Wt::WAnchor::WAnchor(const std::string&, Wt::WContainerWidget*)
>
> /usr/include/Wt/WAnchor:47: note:
> Wt::WAnchor::WAnchor(Wt::WContainerWidget*)
>
> /usr/include/Wt/WAnchor:43: note:
> Wt::WAnchor::WAnchor(const Wt::WAnchor&)
>
> make[2]: *** [hello1/CMakeFiles/hello.wt.dir/hello.o] Error 1
>
> make[1]: *** [hello1/CMakeFiles/hello.wt.dir/all] Error 2
> make: *** [all] Error 2
>
>
> what is the problem in this.
>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
--
// Dmitriy.
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest