#IFDEF GT_WIN_DEFAULT x GT_WVG_DEFAULT
Enviado: 13 Mar 2016 14:30
Pessoal bom(a) dia/tarde/noite/madrugada!
O Professor asimoes postou o seguinte código:
Bom, durante a execução do meu aplicativo de único .EXE, preciso escolher - de acordo com os módulos, entre qual GT será usada.
O programa em geral, será compilado com #include "HMG.CH" e usar a função HB_GTSYS(), com o seguinte conteúdo:
Em todos os cadastros, consultas, relatórios, estou usando os objetos, funções, procedures GRÁFICOS da lib GTWVG.
Mas, no módulo VENDAS, por não caber todos os @say,get, quero usar a GT_WIN_DEFAULT.
Bom, infelizmente, na hora da compilação - não é erro de runtime, me dá o seguinte erro:
Finalmente, o professor asimoes sugeriu as linhas do #IFDEF que define tal coisa. Bom, mas, não sei a sintaxe desse comando e mesmo usando-o gera mensagem de erro.
Nota:
1 - harbour 3.2
2 - compilando com HMG/IDE 3.4.2.
Bom domingo!
O Professor asimoes postou o seguinte código:
Código: Selecionar todos
#ifdef gt1
REQUEST GT_WIN_DEFAULT
#endif
#ifdef gt2
REQUEST GT_WVG_DEFAULT
#endifO programa em geral, será compilado com #include "HMG.CH" e usar a função HB_GTSYS(), com o seguinte conteúdo:
Código: Selecionar todos
PROCEDURE HB_GTSYS()
REQUEST HB_GT_WVG_DEFAULT
// REQUEST HB_GT_WIN_DEFAULT
REQUEST HB_GT_WVG
REQUEST HB_GT_WIN
RETURNMas, no módulo VENDAS, por não caber todos os @say,get, quero usar a GT_WIN_DEFAULT.
Bom, infelizmente, na hora da compilação - não é erro de runtime, me dá o seguinte erro:
Ou seja, os erros acima, são das seguintes linhas:Harbour 3.2.0dev (r1509031202)
Copyright (c) 1999-2015, http://harbour-project.org/
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(691) Error E0030 Syntax error "syntax error at 'WINDOW'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(692) Error E0030 Syntax error "syntax error at 'MAIN'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(693) Error E0030 Syntax error "syntax error at 'Test'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(694) Error E0030 Syntax error "syntax error at 'Disable button'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(695) Error E0030 Syntax error "syntax error at 'Enable button'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(696) Error E0030 Syntax error "syntax error at 'END'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(697) Error E0030 Syntax error "syntax error at 'END'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(699) Error E0030 Syntax error "syntax error at '@'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(700) Error E0030 Syntax error "syntax error at 'END'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(701) Error E0030 Syntax error "syntax error at 'WINDOW'"
C:\MVinfo\MIGRAR\SiCCA\SiCCA3603hmg\sci10000\pci10011.prg(702) Error E0030 Syntax error "syntax error at 'WINDOW'"
11 errors
Código: Selecionar todos
DEFINE WINDOW Form_Main AT 0,0 WIDTH 640 HEIGHT 480 VIRTUAL WIDTH 1300 VIRTUAL HEIGHT 800 TITLE 'Virtual Dimensioned Window Demo' MAIN
@ 100,10 BUTTON Button_1 CAPTION 'Vert. ScrollBar Value' ACTION MsgInfo( Str ( Form_Main.VScrollBar.Value ) ) WIDTH 150 HEIGHT 25
@ 200,10 BUTTON Button_2 CAPTION 'Horiz. ScrollBar Value' ACTION MsgInfo( Str ( Form_Main.HScrollBar.Value ) ) WIDTH 150 HEIGHT 25
END WINDOW
ACTIVATE WINDOW Form_MainNota:
1 - harbour 3.2
2 - compilando com HMG/IDE 3.4.2.
Bom domingo!