Compile error

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

Compile error

Post by Enrico Maria Giordano »

Compiling the following sample

Code: Select all

#pragma BEGINDUMP

#include "windows.h"

#pragma ENDDUMP
I get:

Code: Select all

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Compile error

Post by Antonio Linares »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Compile error

Post by Enrico Maria Giordano »

Antonio,

I downloaded it from your website but whatsnew reports:

February 2010

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Compile error

Post by Antonio Linares »

Enrico,

> Compiling the following sample

How are you compiling it ?
regards, saludos

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

Re: Compile error

Post by Antonio Linares »

Enrico,

Please try it this way:

Code: Select all

#pragma BEGINDUMP

#define _ARM_

#include <windows.h>

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Compile error

Post by Enrico Maria Giordano »

Antonio,

now I get:

Code: Select all

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: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Compile error

Post by Enrico Maria Giordano »

But compiling this:

Code: Select all

#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

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: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Compile error

Post by Enrico Maria Giordano »

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

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Compile error

Post by Antonio Linares »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Compile error

Post by Enrico Maria Giordano »

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

Code: Select all

error LNK2001: unresolved external symbol HB_FUN_GETLASTERROR
EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Compile error

Post by Antonio Linares »

Enrico,

What example are you building ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Compile error

Post by Enrico Maria Giordano »

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Compile error

Post by Antonio Linares »

Enrico,

Here you have it:

Code: Select all

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

Antonio Linares
www.fivetechsoft.com
Post Reply