Thanks, I've changed all the #include (headers) with the Wt/ prefix.

Unfortunately I'm now getting other errors:
hello_world.C: In function ‘int wmain(int, char**)’:
hello_world.C:6:2: error: ‘WApplication’ has not been declared
hello_world.C:6:29: error: expected ‘;’ before ‘appl’
hello_world.C:9:2: error: ‘appl’ was not declared in this scope
hello_world.C:9:29: error: expected type-specifier before ‘Wtext’
hello_world.C:9:29: error: expected ‘)’ before ‘Wtext’
hello_world.C:12:2: error: ‘WPushButton’ was not declared in this scope
hello_world.C:12:15: error: ‘Button’ was not declared in this scope
hello_world.C:12:28: error: expected type-specifier before ‘WPushButton’
hello_world.C:12:28: error: expected ‘;’ before ‘WPushButton’
hello_world.C:13:26: error: ‘Wapplication’ has not been declared

Would you recommend I follow a different "Getting started guide",
because this one is out of date, or would it be fine to continue with
this one?

Please help me by either fixing the small .C program, or recommending
a different guide.

Thanks for all suggestions,

Alec Taylor

On Wed, Jul 27, 2011 at 2:23 AM, Thomas Suckow <[email protected]> wrote:
> You should
> #include <Wt/WApplication>
> instead of
> #include <WApplication>
>
> Best of luck
>
> --
> Thomas
>
> On 07/26/2011 09:21 AM, Alec Taylor wrote:
>> Good Morning,
>>
>> Unfortunately it seems I'm unable to compile, even the simplest of Wt 
>> projects.
>>
>> I'm able to compile all the examples fine (Ubuntu 11.04), however when
>> I create my own custom-project I run into some problems.
>>
>> I'm following a tutorial, and here is the very-basic hello_world.C
>> file catalogue:
>> #include<WApplication>
>> #include<WText>
>> #include<WPushButton>
>>
>> int wmain(int argc, char **argv) {
>>       WApplication appl(argc, argv);
>>       // Widgets can be added to a parent
>>       // by calling addWidget() ...
>>       appl.root()->addWidget(new Wtext("<h1>Hello, World!</h1>"));
>>       // ... or by specifying a parent at
>>       // construction time
>>       WPushButton *Button = new WPushButton("Quit", appl.root());
>>       Button->clicked.connect(SLOT(&appl, Wapplication::quit));
>>       return appl.exec();
>> }
>>
>> My CMakeLists.txt is as follows:
>> ADD_EXECUTABLE(hello_world.wt hello_world.C)
>> TARGET_LINK_LIBRARIES(hello_world.wt /usr/include/Wt)
>> INCLUDE_DIRECTORIES(/usr/include/Wt)
>>
>> To compile, I run:
>> ~/Wt/examples/hello_world$ g++ -L/usr/lib -lwt -lwthttp hello_world.C
>> -o hello_world.wt
>> hello_world.C:1:24: fatal error: WApplication: No such file or directory
>> compilation terminated
>> ___
>>
>> (am I meant to run the cmake program first?)
>> ___
>>
>> Please tell me what I need to do in order to get my custom projects running.
>>
>> Thank you for all suggestions,
>>
>> Alec Taylor
>>
>> PS: I'm also having trouble running the database-backed examples, such
>> as wt-homepage. Log: http://pastebin.com/5ER5vZBa Error within
>> Firefox: "??template??"
>>
>> ------------------------------------------------------------------------------
>> Magic Quadrant for Content-Aware Data Loss Prevention
>> Research study explores the data loss prevention market. Includes in-depth
>> analysis on the changes within the DLP market, and the criteria used to
>> evaluate the strengths and weaknesses of these DLP solutions.
>> http://www.accelacomm.com/jaw/sfnl/114/51385063/
>> _______________________________________________
>> witty-interest mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
> ------------------------------------------------------------------------------
> Magic Quadrant for Content-Aware Data Loss Prevention
> Research study explores the data loss prevention market. Includes in-depth
> analysis on the changes within the DLP market, and the criteria used to
> evaluate the strengths and weaknesses of these DLP solutions.
> http://www.accelacomm.com/jaw/sfnl/114/51385063/
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to