Hello why do I get so many Ambiguous reference error with the compiler.
Here 11 error for the same line!..
I have the following compiler options:
SET PATH=c:\HMG\mingw\bin;C:\HMG\MINGW\LIBEXEC\GCC\MINGW32\3.4.5
SET MINGW=c:\HMG\mingw
SET HRB_DIR=c:\HMG\harbour
SET OBJ_DIR=c:\HMG\KALGA32\obj\
SET MINIGUI_INSTALL=c:\HMG
%HRB_DIR%\bin\harbour kalga.prg -m -v -q -w2 -n -i%HRB_DIR%\include;%MINIGUI_INSTALL%\include; -o%OBJ_DIR%
Source line 61-65:
61 DEFINE STATUSBAR
62 STATUSITEM "Kalga Win Version 0.0"
63 CLOCK
64 DATE
65 END STATUSBAR
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
Many thanks in advance for any help.
Many Ambiguous reference error for the same source line ?
Moderator: Rathinagiri
Re: Many Ambiguous reference error for the same source line ?
Hello,ohaldi wrote:Hello why do I get so many Ambiguous reference error with the compiler.
Here 11 error for the same line!..
I have the following compiler options:
SET PATH=c:\HMG\mingw\bin;C:\HMG\MINGW\LIBEXEC\GCC\MINGW32\3.4.5
SET MINGW=c:\HMG\mingw
SET HRB_DIR=c:\HMG\harbour
SET OBJ_DIR=c:\HMG\KALGA32\obj\
SET MINIGUI_INSTALL=c:\HMG
%HRB_DIR%\bin\harbour kalga.prg -m -v -q -w2 -n -i%HRB_DIR%\include;%MINIGUI_INSTALL%\include; -o%OBJ_DIR%
Source line 61-65:
61 DEFINE STATUSBAR
62 STATUSITEM "Kalga Win Version 0.0"
63 CLOCK
64 DATE
65 END STATUSBAR
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
...
kalga.prg(65) Warning W0002 Ambiguous reference, assuming memvar: '_HMG_SYSDATA'
Many thanks in advance for any help.
Don't worry It is a warning only
Solution:
Try to add on top (first line) of your module kalga.prg the following statement:
MEMVAR _HMG_SYSDATA
I hope that helps
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Many Ambiguous reference error for the same source line ?
Hello Ottoohaldi wrote:Hello why do I get so many Ambiguous reference error with the compiler.
OR :
Simply change
%HRB_DIR%\bin\harbour kalga.prg -m -v -q -w2 -n -i%HRB_DIR%\include;%MINIGUI_INSTALL%\include; -o%OBJ_DIR%
line to
%HRB_DIR%\bin\harbour kalga.prg -m -v -q -w0 -n i%HRB_DIR%\include;%MINIGUI_INSTALL%\include; -o%OBJ_DIR%
Regards
--
Esgici
Viva INTERNATIONAL HMG
Re: Many Ambiguous reference error for the same source line ?
Hello,
I did the following change:
For example in this code the compiler do not show me that the variable vName is not declared with the switch w0.
STATIC FUNCTION Search()
// Local vName := ""
DEFINE WINDOW Win_Adr_Search ;
AT 300,300 ;
WIDTH 360 ;
HEIGHT 200 ;
TITLE 'Suchen' ;
MODAL NOSIZE
ON KEY ESCAPE ACTION Win_Adr_Search.Release
@ 30,10 LABEL LABEL_1 VALUE "Name"
@ 30,100 TEXTBOX TEXT_1;
VALUE vName WIDTH 200
END WINDOW
ACTIVATE WINDOW Win_Adr_Search
Return nil
I also tested w1,w2,w3 but no one give me a good result.
With clipper I didn't have had this problem!
I did the following change:
But now I don't see any compiler error anymore!Code: Select all
%HRB_DIR%\bin\harbour kalga.prg -m -v -q -w0 -n i%HRB_DIR%\include;%MINIGUI_INSTALL%\include; -o%OBJ_DIR%
For example in this code the compiler do not show me that the variable vName is not declared with the switch w0.
STATIC FUNCTION Search()
// Local vName := ""
DEFINE WINDOW Win_Adr_Search ;
AT 300,300 ;
WIDTH 360 ;
HEIGHT 200 ;
TITLE 'Suchen' ;
MODAL NOSIZE
ON KEY ESCAPE ACTION Win_Adr_Search.Release
@ 30,10 LABEL LABEL_1 VALUE "Name"
@ 30,100 TEXTBOX TEXT_1;
VALUE vName WIDTH 200
END WINDOW
ACTIVATE WINDOW Win_Adr_Search
Return nil
I also tested w1,w2,w3 but no one give me a good result.
With clipper I didn't have had this problem!
Regards
Otto
Otto
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Many Ambiguous reference error for the same source line ?
Hi Ottoohaldi wrote: For example in this code the compiler do not show me that the variable vName is not declared with the switch w0.
"Variable not found" is a RTE ( run time error ) no compile time.
"w" compiler switch is "warning level" and digit associated it is "level"; so, "w0" mains "no produce any messages for warning errors".
You can also use "v" switch for "assume variables as M->"
You can get more information about compiler options / switchs by launching harbour.exe no without parameter or with '?' switch.
Of course declaring MEMVAR _HMG_SYSDATA as Grigory suggested, will be another good solution.
By the way, why you don't use IDE as project builder ?
Perhaps you like struggle with cryptic tools, such as .bat files
Regards
--
Esgici
Viva INTERNATIONAL HMG
Re: Many Ambiguous reference error for the same source line ?
maybe trivial question: Did you declare MAIN function?
Re: Many Ambiguous reference error for the same source line ?
Hello
With the batch file, the errors are displayed directly in the Editor. Then I only have to click on the error line to be placed directly on the correct prg and line.
Actually I have only a simple batch to compile all my prg's. I don't see the reason to install 34MB of
files (HMGIDE) if I don't use it.
Thanks to all for your help.
I used the following solution. It is a good idea. It give me a view of all used variables.Try to add on top (first line) of your module kalga.prg the following statement:
MEMVAR _HMG_SYSDATA
Because I can't include it in my Editor. And the output can't be captured.By the way, why you don't use IDE as project builder ?
With the batch file, the errors are displayed directly in the Editor. Then I only have to click on the error line to be placed directly on the correct prg and line.
I like to understand what I do. I think it is interesting to know the possibility of a compiler.Perhaps you like struggle with cryptic tools, such as .bat files
Actually I have only a simple batch to compile all my prg's. I don't see the reason to install 34MB of
files (HMGIDE) if I don't use it.
Thanks to all for your help.
Regards
Otto
Otto