Usando el simulador del iPhone/iPad

Re: Usando el simulador del iPhone/iPad

Postby Antonio Linares » Thu Nov 11, 2010 4:58 pm

Faltaban estos dos flags:

-fobjc-abi-version=2 -fobjc-legacy-dispatch

Ya falta menos :-) Solo 2 símbolos que resolver !!!

compiling...
Harbour 2.1.0beta1 (Rev. 14766)
Copyright (c) 1999-2010, http://harbour-project.org/
Compiling 'tutor02.prg'...
Lines 62, Functions/Procedures 1
Generating C source output to 'tutor02.c'... Done.
compiling C module...
linking...
Undefined symbols:
"___bzero", referenced from:
_hb_stackInit in libhbvm.a(hvmall.o)
_hb_objDestructorCall in libhbvm.a(hvmall.o)
_hb_clsNew in libhbvm.a(hvmall.o)
_hb_dynsymToNum in libhbvm.a(hvmall.o)
_hb_stackGetTSD in libhbvm.a(hvmall.o)
_hb_stackGetTSD in libhbvm.a(hvmall.o)
_hb_clsAllocMsg in libhbvm.a(hvmall.o)
_hb_clsDictInit in libhbvm.a(hvmall.o)
_hb_rddNewAreaNode in libhbrdd.a(wafunc.o)
_hb_rddNewAreaNode in libhbrdd.a(wafunc.o)
_hb_rddNewAreaNode in libhbrdd.a(wafunc.o)
_hb_cdpBuildTransTable in libhbrtl.a(cdpapi.o)
_hb_cdpFindPos in libhbrtl.a(cdpapi.o)
_hb_cdpRegisterNew in libhbrtl.a(cdpapi.o)
_hb_gtLoad in libhbrtl.a(hbgtcore.o)
_hb_gtLoad in libhbrtl.a(hbgtcore.o)
_hb_gt_def_New in libhbrtl.a(hbgtcore.o)
_hb_gt_def_Resize in libhbrtl.a(hbgtcore.o)
_hb_gt_def_Resize in libhbrtl.a(hbgtcore.o)
_hb_gt_def_StringToColors in libhbrtl.a(hbgtcore.o)
_va_arg_get in libhbcommon.a(hbprintf.o)
_va_arg_get in libhbcommon.a(hbprintf.o)
_hb_waNodeInsert in libhbrdd.a(wacore.o)
_hb_waNodeInsert in libhbrdd.a(wacore.o)
_hb_waNodeInsert in libhbrdd.a(wacore.o)
_hb_rddRegister in libhbrdd.a(workarea.o)
_hb_waSetFieldExtent in libhbrdd.a(workarea.o)
_hb_fsFindFirst in libhbcommon.a(hbffind.o)
_hb_fsFindFirst in libhbcommon.a(hbffind.o)
_hb_dbfSetFieldExtent in libhbrdd.a(dbf1.o)
_hb_dbfCreate in libhbrdd.a(dbf1.o)
_hb_dbfCreate in libhbrdd.a(dbf1.o)
_hb_dbfOpen in libhbrdd.a(dbf1.o)
_hb_dbfOpen in libhbrdd.a(dbf1.o)
_hb_dbfPasswordSet in libhbrdd.a(dbf1.o)
_hb_dbfSetBlankRecord in libhbrdd.a(dbf1.o)
_hb_gt_trm_Init in libgttrm.a(gttrm.o)
_hb_gt_trm_SetDispTrans in libgttrm.a(gttrm.o)
_hb_gt_trm_SetDispTrans in libgttrm.a(gttrm.o)
_hb_fptCreateMemFile in librddfpt.a(dbffpt1.o)
_hb_fptCreateMemFile in librddfpt.a(dbffpt1.o)
_hb_fptOpenMemFile in librddfpt.a(dbffpt1.o)
_hb_fptWriteMemo in librddfpt.a(dbffpt1.o)
_hb_fptWriteMemo in librddfpt.a(dbffpt1.o)
_hb_fptWriteMemo in librddfpt.a(dbffpt1.o)
_hb_ntxOrderCreate in librddntx.a(dbfntx1.o)
_hb_ntxTagHeaderSave in librddntx.a(dbfntx1.o)
_hb_ntxIndexTagAdd in librddntx.a(dbfntx1.o)
_hb_ntxPageGetBuffer in librddntx.a(dbfntx1.o)
_hb_ntxKeyPutItem in librddntx.a(dbfntx1.o)
_hb_ntxKeyPutItem in librddntx.a(dbfntx1.o)
_hb_ntxKeyPutItem in librddntx.a(dbfntx1.o)
_hb_ntxTagNew in librddntx.a(dbfntx1.o)
_hb_ntxTagCreate in librddntx.a(dbfntx1.o)
_hb_ntxTagCreate in librddntx.a(dbfntx1.o)
__hb_sxGetKey in libhbsix.a(sxcrypt.o)
_hb_fileInsertLock in libhbrtl.a(filebuf.o)
"_fopen$UNIX2003", referenced from:
_hb_fopen in libhbcommon.a(hbfopen.o)
ld: symbol(s) not found
regards, saludos

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

Re: Usando el simulador del iPhone/iPad

Postby Antonio Linares » Thu Nov 11, 2010 5:12 pm

Parece que ___bzero() podemos implementarlo facilmente:

http://www.opensource.apple.com/source/Libc/Libc-594.1.4/arm/string/NEON/bzero.s

// void bzero(void * destination,
// size_t length);
//
// zeros out a buffer length bytes long, beginning at the address destination.
regards, saludos

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

Re: Usando el simulador del iPhone/iPad

Postby Antonio Linares » Thu Nov 11, 2010 5:14 pm

Lo implemento asi:

Code: Select all  Expand view

void __bzero( void * destination, size_t length )
{
    memset( destination, 0, length );
}   
 


Ya solo queda un símbolo que resolver...

Harbour 2.1.0beta1 (Rev. 14766)
Copyright (c) 1999-2010, http://harbour-project.org/
Compiling 'tutor02.prg'...
Lines 62, Functions/Procedures 1
Generating C source output to 'tutor02.c'... Done.
compiling C module...
linking...
Undefined symbols:
"_fopen$UNIX2003", referenced from:
_hb_fopen in libhbcommon.a(hbfopen.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
regards, saludos

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

Re: Usando el simulador del iPhone/iPad

Postby Antonio Linares » Thu Nov 11, 2010 5:29 pm

Parece que por aqui van los tiros:
http://cocoawithlove.com/2009/09/building-for-earlier-os-versions-in.html

A common example of getting this wrong is the following linker error:

Undefined symbols:
"_fopen$UNIX2003", referenced from:
_some_function in somefile.o
You will get this and similar errors when trying to link two different components which are themselves linked against different versions of libSystem. In this case, the application was linked against Base SDK Mac OS X 10.5 but the static library was linked against the current libSystem.B.dylib in Mac OS X 10.6.

Obviously, fopen is a Standard C function and it is in every version of libSystem but different versions of libSystem have subtly different versions of the function. To fix the bug, you must ensure that all components you link together themselves link against the same versions of the standard libraries.

In the example above, the solution is to rebuild the static library from the source using the following gcc link-line options:

-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5


Parece que tenemos que reconstruir las librerias de Harbour Darwin 32 para que use 10.5 como versión mínima
regards, saludos

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

Re: Usando el simulador del iPhone/iPad

Postby mastintin » Thu Nov 11, 2010 5:58 pm

Menudo empujón le has dado . Supongo que no tendras demasiado problema para volver a compilar harbour , asi que has avanzado un montón .
Saludos.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Usando el simulador del iPhone/iPad

Postby Antonio Linares » Thu Nov 11, 2010 11:30 pm

Construidas las librerias de Harbour para el simulador usando:
export HB_USER_CFLAGS="-arch i386 -mmacosx-version-min=10.5"

Ya enlaza bien! :-)

Aqui estan las librerias:
http://www.mediafire.com/?ixdmgvu2wt220kr

Ahora a ver donde copiar el ejecutable para probarlo en el simulador...
regards, saludos

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

Re: Usando el simulador del iPhone/iPad

Postby Antonio Linares » Thu Nov 11, 2010 11:56 pm

Parece que es aqui donde habria que copiar el ejecutable:
z:\Users\anto\Library\Application Support\iPhone Simulator\4.1\Applications\...

Lo he copiado y no arranca, será la falta del certificado ??
regards, saludos

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

Re: Usando el simulador del iPhone/iPad

Postby Antonio Linares » Fri Nov 12, 2010 12:09 am

Formas de firmar el ejecutable:

http://www.saurik.com/id/8
regards, saludos

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

Re: Usando el simulador del iPhone/iPad

Postby mastintin » Fri Nov 12, 2010 10:09 am

antonio . Probaste a usar el mismo truco que en el iphone con TabBarSample ? . Me refiero a compilar un programa basico en xcode y lanzarlo en el simulador ( tiene que funcionar si o si ) luego entramos en el programa y cambiamos el ejecutable ....
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Usando el simulador del iPhone/iPad

Postby Antonio Linares » Fri Nov 12, 2010 10:21 am

Manuel,

Si, eso es lo que hice y no arranca. Le hice el chmod +x ... pero el problema supongo que es que hay que firmar el ejecutable.

Tenemos que ver como hacer eso. No se si pueda existir un ldid para el simulador, no creo.
regards, saludos

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

Re: Usando el simulador del iPhone/iPad

Postby mastintin » Fri Nov 12, 2010 11:07 am

Yo he generado programas en xcode para iphone y se lanzan en el simulador sin problemas . No tengo licencia de programador ( $$$ ) y no tengo noción de haber firmado nada ni de tener ningun tipo de firma personal (¿?) . Si firma algo será el xcode quien lo hace ,miraré si puedo ver que ordenes lanza el xcode y si realiza algun tipo de llamada a programas ...
Cuando llegue a casa intento buscar un momento para mirarlo .
Saludos.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm


Previous

Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 3 guests