Re: Re: problem use ThotKernel API in VC++6.0

Irene Vatton,

 I have added the includes, but the error still appears.
In fact, I don't want a graphic dispaly application.
I just want to use this library to parse HTML documents.
If I use "document" class to open a document, I include the "document.h"
program like this:

// testamaya.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "document.h"

int main(int argc, char* argv[])
{
 printf("Hello World!\n");
 return 0;
}

I got the following erro  

--------------------Configuration: testamaya - Win32 Debug--------------------
Compiling...
testamaya.cpp
c:\testamaya\include\document.h(125) : error C2146: syntax error : missing ';' before identifier 'TtaExportDocument'
c:\testamaya\include\document.h(125) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

testamaya.exe - 2 error(s), 0 warning(s)

if I just want to use the library to parse some html document, what shall I do?

>On Friday 12 January 2007 06:05, Zhang Gang wrote:
>> dear,all
>>
>>  I want use "ThotKernel" in my project.
>> I use VC++6.0 to call the API. the program like the following:
>>
>> // testamaya.cpp : Defines the entry point for the console application.
>> //
>>
>> #include "stdafx.h"
>> #include "application.h"
>> int main(int argc, char* argv[])
>> {
>>  printf("Hello World!\n");
>> // TtaInitialize("test amaya");
>> // TtaInitializeAppRegistry("test amaya");
>>  return 0;
>> }
>
>You need to add following includes before "application.h"
>#include "thot_gui.h"
>#include "thot_sys.h"
>#include "appstruct.h"
>
>"application.h" is used by an application with graphic display and not a batch 
>application. It supposes that almost a window with menus is open.
>
>The print application is probably an interesting example for you as it 
>manipulates document structures and doesn't display anything (see 
>Amaya/tholib/editing/print.c)
>
>> But, I get the following error message:
>>
>>
>> --------------------Configuration: testamaya - Win32
>> Debug-------------------- Compiling...
>> testamaya.cpp
>> c:\testamaya\include\interface.h(135) : error C2061: syntax error :
>> identifier 'ThotIcon' c:\testamaya\include\interface.h(174) : error C2061:
>> syntax error : identifier 'ThotIcon' c:\testamaya\include\interface.h(277)
>> : error C2146: syntax error : missing ';' before identifier
>> 'TtaGetViewFrame' c:\testamaya\include\interface.h(277) : fatal error
>> C1004: unexpected end of file found Error executing cl.exe.
>>
>> testamaya.exe - 4 error(s), 0 warning(s)
>>
>> how to correct the error?
>>
>> help,and thanks!
>>
>>         Zhang Gang
>>         gangzhang@ict.ac.cn
>>           2007-01-12
>
>-- 
>     Irène.
>-----
>Irène Vatton                     INRIA Rhône-Alpes
>INRIA                               ZIRST
>e-mail: Irene.Vatton@inria.fr       655 avenue de l'Europe
>Tel.: +33 4 76 61 53 61             Montbonnot
>Fax:  +33 4 76 61 52 07             38334 Saint Ismier Cedex - France
>
>
>

   
        Zhang Gang
        gangzhang@ict.ac.cn
          2007-01-12

Received on Friday, 12 January 2007 10:17:54 UTC