DLL32 STATIC FUNCTION...

DLL32 STATIC FUNCTION...

Postby reinaldocrespo » Thu Feb 02, 2006 7:01 pm

Hi.

I can't see why when trying to compile these three lines below I get the errors I show further down:

DLL32 STATIC FUNCTION GetMenu( hwnd AS LONG ) AS LONG PASCAL LIB "USER32"

DLL32 STATIC FUNCTION GetMenuInfo( hMenu AS LONG, cMenuInfo AS LPSTR) AS LONG PASCAL FROM "GetMenuInfo" LIB "USER32"

DLL32 Static Function SetMenuInfo( hMenu AS LONG, cMenuInfo AS LPSTR) AS LONG PASCAL FROM "SetMenuInfo" LIB "USER32"



MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
f:\xharbour_0.99\bin\harbour.exe -i..\shared;f:\fwh\include;f:\fivewin\include;f:\xharbour_0.99\include -n -m -w -es2 -gc0 ..\shared\shared.prg -o\mp\Reports\shared.xhrb
xHarbour Compiler build 0.99.2 (SimpLex)
Copyright 1999-2004, http://www.xharbour.org http://www.harbour-project.org/
Compiling '..\shared\shared.prg'...

..\shared\shared.prg(2860) Warning W0001 Ambiguous reference: 'LONG'

..\shared\shared.prg(2861) Warning W0001 Ambiguous reference: 'LONG'

..\shared\shared.prg(2862) Warning W0001 Ambiguous reference: 'LONG'

..\shared\shared.prg(2863) Warning W0001 Ambiguous reference: 'LONG'

..\shared\shared.prg(2864) Warning W0001 Ambiguous reference: 'LONG'

..\shared\shared.prg(2865) Warning W0001 Ambiguous reference: 'LONG'

..\shared\shared.prg(2866) Warning W0001 Ambiguous reference: 'LONG'

..\shared\shared.prg(2891) Error E0030 Syntax error: "parse error at 'STATIC'"

..\shared\shared.prg(2893) Error E0030 Syntax error: "parse error at 'STATIC'"

..\shared\shared.prg(2895) Error E0030 Syntax error: "parse error at 'STATIC'"

3 errors

No code generated

** error 1 ** deleting \mp\Reports\shared.xhrb


Can someone help?

thank you,


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: DLL32 STATIC FUNCTION...

Postby Enrico Maria Giordano » Thu Feb 02, 2006 7:05 pm

Try adding

#include "Dll.ch"

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

Postby reinaldocrespo » Thu Feb 02, 2006 7:22 pm

Enrico;

Thank you for your reply.

Added the line #include "dll.ch" at the top of the file, but I still get the exact same errors.


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby Antonio Linares » Thu Feb 02, 2006 7:26 pm

Reinaldo,

This code compiles ok on first try with both Harbour and xharbour:
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

function Main()

   MsgInfo( "ok" )
           
return nil

DLL32 STATIC FUNCTION GetMenu( hwnd AS LONG ) AS LONG PASCAL LIB "USER32"

DLL32 STATIC FUNCTION GetMenuInfo( hMenu AS LONG, cMenuInfo AS LPSTR) AS LONG PASCAL FROM "GetMenuInfo" LIB "USER32"

DLL32 Static Function SetMenuInfo( hMenu AS LONG, cMenuInfo AS LPSTR) AS LONG PASCAL FROM "SetMenuInfo" LIB "USER32"


Please check that you are using the right header files, and there are no conflicts with other header files, or some defines in your app.
regards, saludos

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

Postby reinaldocrespo » Thu Feb 02, 2006 7:40 pm

Antonio;

You are right. I tested a new file with your code and it did compile. So I went back to my offending file in the project and searched for #defines that might be obstructing. And, indeed, I found it.

#define _DLL_CH


Sorry.

Thank you for the help.


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby Antonio Linares » Thu Feb 02, 2006 8:02 pm

Reinaldo,

glad to know you solved it :)
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 90 guests