Compile error

Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 11:23 am

Compiling the following sample

Code: Select all  Expand view
#pragma BEGINDUMP

#include "windows.h"

#pragma ENDDUMP


I get:

Code: Select all  Expand view
e:\vce\include\winnt.h(2978) : error C2061: syntax error : identifier 'PCONTEXT'
e:\vce\include\winnt.h(2979) : error C2059: syntax error : '}'
e:\vce\include\winbase.h(1416) : error C2061: syntax error : identifier 'LPCONTEXT'
e:\vce\include\winbase.h(1416) : error C2059: syntax error : ';'
e:\vce\include\winbase.h(2119) : error C2146: syntax error : missing ')' before identifier 'lpContext'
e:\vce\include\winbase.h(2119) : error C2081: 'LPCONTEXT' : name in formal parameter list illegal
e:\vce\include\winbase.h(2119) : error C2061: syntax error : identifier 'lpContext'
e:\vce\include\winbase.h(2119) : error C2059: syntax error : ';'
e:\vce\include\winbase.h(2120) : error C2059: syntax error : ')'
e:\vce\include\winbase.h(2127) : error C2143: syntax error : missing ')' before '*'
e:\vce\include\winbase.h(2127) : error C2143: syntax error : missing '{' before '*'
e:\vce\include\winbase.h(2128) : error C2059: syntax error : ')'


What am I missing?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Antonio Linares » Mon Oct 26, 2015 11:27 am

Enrico,

Are you using the most recent FWPPC ?

whatsnew.txt
March 2015
==========

* New: We are using most recent Harbour 3.4 from Vikthor.

* New: FWPPC is using Visual Studio 2013.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 12:34 pm

Antonio,

I downloaded it from your website but whatsnew reports:

February 2010

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Antonio Linares » Mon Oct 26, 2015 2:26 pm

Enrico,

> Compiling the following sample

How are you compiling it ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 2:34 pm

Antonio,

with the provided buildce.bat.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Antonio Linares » Mon Oct 26, 2015 3:06 pm

Enrico,

Please try it this way:

Code: Select all  Expand view
#pragma BEGINDUMP

#define _ARM_

#include <windows.h>

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 3:14 pm

Antonio,

now I get:

Code: Select all  Expand view
fivecec.lib(fwce.obj) : error LNK2005: __security_cookie already defined in corelibc.lib(seccook.obj)
fivecec.lib(fwce.obj) : error LNK2005: __security_check_cookie already defined in corelibc.lib(armsecgs.obj)
fivecec.lib(fwce.obj) : error LNK2005: InvertRect already defined in coredll.lib(COREDLL.dll)


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 3:18 pm

But compiling this:

Code: Select all  Expand view
#include "Fwce.ch"


FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd

    @ 1, 1 BUTTON "Riproduci";
           SIZE 60, 30;
           ACTION ( SNDPLAYSOUND( CURDIR() + "\CONFERMA.WAV" ), SNDPLAYSOUND( CURDIR() + "\CONFERMA.WAV" ), SNDPLAYSOUND( CURDIR() + "\CONFERMA.WAV" ) )

    ACTIVATE WINDOW oWnd

    RETURN NIL


#pragma BEGINDUMP

#define _ARM_

#include "windows.h"
#include "mmsystem.h"
#include "hbapi.h"


LPWSTR AnsiToWide( LPSTR );


HB_FUNC( SNDPLAYSOUND )
{
    LPWSTR pW = AnsiToWide( hb_parc( 1 ) );
    hb_retnl( sndPlaySound( pW, hb_parni( 2 ) ) );
    hb_xfree( pW );
}

#pragma ENDDUMP


I get:

Code: Select all  Expand view
test.prg(33) : warning C4090: 'function' : different 'const' qualifiers
gtwvt.lib(gtwvt.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x000F9108


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 3:20 pm

And the EXE has been produced. I can't test it, sorry. I'm not using FWPCC anymore.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Antonio Linares » Mon Oct 26, 2015 3:32 pm

Enrico,

> test.prg(33) : warning C4090: 'function' : different 'const' qualifiers
> gtwvt.lib(gtwvt.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x000F9108

This is fine. The app should work ok.

> And the EXE has been produced. I can't test it, sorry. I'm not using FWPCC anymore

Then why are you doing these tests ? :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 3:48 pm

I updated FWPPC and found that problem. :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 4:24 pm

I get the following unresolved external that I didn't get with the previous FWPCC version:

Code: Select all  Expand view
error LNK2001: unresolved external symbol HB_FUN_GETLASTERROR


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Antonio Linares » Mon Oct 26, 2015 6:11 pm

Enrico,

What example are you building ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compile error

Postby Enrico Maria Giordano » Mon Oct 26, 2015 6:14 pm

Antonio,

one of my old applications that use GetLastError(). It seems that it was defined in the previous FWPPC version. Now it's not anymore.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Compile error

Postby Antonio Linares » Mon Oct 26, 2015 6:18 pm

Enrico,

Here you have it:
Code: Select all  Expand view

HB_FUNC( GETLASTERROR ) // () --> nError
{
   hb_retnl( GetLastError() );
}
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 10 guests