FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Pocket PC Tutor ejemplo1.prg(mjcc)
Posts: 139
Joined: Fri Apr 07, 2006 09:16 PM
Tutor ejemplo1.prg(mjcc)
Posted: Sat Apr 08, 2006 05:55 PM

include “FiveWin.ch”

STATIC oWnd

FUNCTION Main()

DEFINE WINDOW oWnd TITLE “Mi primer programa” ;
  MENU BuildMenu()

SET MESSAGE OF oWnd TO “Mi nombre” CENTERED

ACTIVATE WINDOW oWnd VALID MsgYesNO(“¿Desea salir?”)

return nil

//-----------------------------------------------------//

Function BuildMenu()

local oMenu

MENU oMenu
  MENUITEM “Fin” ACTION oWnd:End()
ENDMENU

Return oMenu

He recogido el ejemplo uno al intentar compilarlo me da los siguientes errores

Compiling...
Harbour Compiler Alpha build 45.0 (Flex)
Copyright 1999-2005, http://www.harbour-project.org/
Compiling 'mjcc.prg' and generating preprocessed output to 'mjcc.ppo'...
Lines 28, Functions/Procedures 2
Generating C source output to 'mjcc.c'... Done.
Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9615 for ARM
Copyright (C) Microsoft Corp 1984-2002. All rights reserved.

mjcc.c
Creating library mjcc.lib and object mjcc.exp
mjcc.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_MENUEN
D(void)" (?HB_FUN_MENUEND@@YAXXZ)
mjcc.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_MENUAD
DITEM(void)" (?HB_FUN_MENUADDITEM@@YAXXZ)
mjcc.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_MENUBE
GIN(void)" (?HB_FUN_MENUBEGIN@@YAXXZ)
mjcc.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_TMSGBA
R(void)" (?HB_FUN_TMSGBAR@@YAXXZ)
mjcc.exe : fatal error LNK1120: 4 unresolved externals
* Application successfully built

C:\manolo>

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Tutor ejemplo1.prg(mjcc)
Posted: Sat Apr 08, 2006 07:25 PM

Manuel,

Los menús en FWPPC no pueden crearse desde código fuente, sino desde recursos. De momento, prueba a construir el ejemplo samples\tutor03 haciendo: buildce.bat tutor03

Si tienes todo bien instalado, debe crearte tutor03.exe

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 139
Joined: Fri Apr 07, 2006 09:16 PM
tutor 03
Posted: Sat Apr 08, 2006 08:30 PM

He probado el tutor03 y me funciona pero al terminar la compilacion me da un error.

Compiling...
Harbour Compiler Alpha build 45.0 (Flex)
Copyright 1999-2005, http://www.harbour-project.org/
Compiling 'tutor03.prg' and generating preprocessed output to 'tutor03.ppo'...
Lines 35, Functions/Procedures 2
Generating C source output to 'tutor03.c'... Done.
Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9615 for ARM
Copyright (C) Microsoft Corp 1984-2002. All rights reserved.

tutor03.c
Creating library tutor03.lib and object tutor03.exp
vm.lib(hvm.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rva=
0x00031028
rdd.lib(dbf1.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rv
a=0x000874B0
dbfntx.lib(dbfntx1.obj) : warning LNK1166: cannot adjust code at offset=0x000010
00, rva=0x00094EFC
dbffpt.lib(dbffpt1.obj) : warning LNK1166: cannot adjust code at offset=0x000010
00, rva=0x000AA9D8
* Application successfully built

C:\FWPPC\SAMPLES>

Posts: 139
Joined: Fri Apr 07, 2006 09:16 PM
Lo siento que sea tan burro
Posted: Sat Apr 08, 2006 08:36 PM

Pero no entiendo la correlacion que existe entre el tutor03.prg y el tutor03.rc.

Uno tiene un codigo y otro tiene otro codigo. Yo he modificado el codigo del tutor03.prg y me funciona con el codigo modificado. No entiendo para que sirve el tutor03.rc

Siento mucho las molestias.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Tutor ejemplo1.prg(mjcc)
Posted: Sat Apr 08, 2006 08:42 PM

Manuel,

Esos cuatro "warnings" (avisos) que dá al construir los EXEs son conocidos y no afectan para nada el funcionamiento del programa. Siempre salen y no hay que preocuparse por ellos :)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Tutor ejemplo1.prg(mjcc)
Posted: Sat Apr 08, 2006 08:44 PM

Manuel,

En tutor03.rc están los literales que usa el menu en tutor03.prg.

Si cambias esos literales, por otras palabras, verás que el menú cambia. También estan definidos unos números que son los códigos que esos menuitems generan al ser seleccionados, y que se encarga de gestionar tutor03.prg.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 139
Joined: Fri Apr 07, 2006 09:16 PM
En tutor03.rc están los literales que usa el menu en tutor03
Posted: Sat Apr 08, 2006 08:55 PM

OK voy a estudiarlo a fondo para ver si consigo enterdelo
siento molestarte tanto pero hasta que no entienda la estructura de funcionamiento no puedo realizar ninguna prueba para datos reales

gracias, por todas tus respuestas y tan rapido.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Tutor ejemplo1.prg(mjcc)
Posted: Sat Apr 08, 2006 09:15 PM

Manuel,

Eres bienvenido y estamos aqui para ayudarte :)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion