FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveMac / FivePhone (iPhone, iPad) he conseguido un iphone
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 03:11 PM

Reemplazando los ficheros de cabecera en los que da error por los de la versi贸n 3.2, entonces lo compila :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 03:16 PM

Antonio , me estoy bajando el sdk del 4.1 ( me qued茅 en el del 3.1 ) y como son varios gb est谩 tardando algo , en cuanto tenga los archivos en su sitio intento cogerte .... ( no creo que me de tiempo hoy , pues mas tarde tengo lio)

-------------------- edito -----------------
he visto justo ahora el mensaje anterior ...creo que debemos recapitular que archivos y versiones se necesitan .

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 04:00 PM

Manuel,

Creo que habria que hacer una prueba con la 3.2 completa, bas谩ndonos en que el ejemplo de esa web a ti te ha funcionado bien.

He conseguido construir un EXE (minimo) completo y arranca, aunque de momento no hace nada. Voy a poner aqui el c贸digo que he usado (el iphone me anda dando errores de conexion wifi...)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 04:04 PM
ios.m
Code (fw): Select all Collapse
#import <UIKit/UIKit.h> 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
#define HB_DONT_DEFINE_BOOL 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
#include <hbapi.h> 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
#include <hbvm.h> 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
static NSAutoreleasePool * pool; 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
HB_FUNC( CREATEPOOL ) 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
{ 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽pool = [ [ NSAutoreleasePool alloc ] init ]; 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
} 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
HB_FUNC( CREATEAPP ) 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
{ 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽UIApplicationMain( 0, nil, @"MainApp", @"MainApp" ); 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
} 聽 聽 聽 聽

@interface MainApp : UIApplication 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
{ 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
} 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
@end 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
@implementation MainApp 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
- ( void ) applicationDidFinishLaunching : ( UIApplication * ) application 聽 聽 聽
{ 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽PHB_SYMB symMain = hb_dynsymSymbol( hb_dynsymFindName( "MAIN" ) ); 聽 聽 聽 聽 聽 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽hb_vmPushSymbol( symMain ); 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽hb_vmPushNil(); 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽hb_vmDo( 0 ); 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽exit( 0 ); 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
} 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
@end


hello.prg
Code (fw): Select all Collapse
function Main() 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽? "Hello world from iOS" 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
return nil 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
init procedure start 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽CreatePool() 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
聽 聽CreateApp() 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 
return

Puede ser que no se vea nada al arrancar la aplicaci贸n porque al crear el pool estamos en modo GUI... no se...

se puede terminar la aplicaci贸n haciendo killall hello desde otra ventana de terminal
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 04:14 PM
Y modificar esto en build.sh:

Code (fw): Select all Collapse
echo linking...                                                                 
gcc $1.o ios.o -o $1 -F/usr/include -L./../lib -L./../../harbour/harbour/harbour
/lib/darwin/gcc -lhbdebug -lhbvm -lhbrtl -lhblang -lhbrdd -lgttrm -lgtstd -lhbrt
l -lhbvm -lhbmacro -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbcommon \              
    -framework CoreFoundation \                                                 
    -framework Foundation \                                                     
    -framework UIKit \                                                          
    -framework CoreGraphics
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 08:38 PM
En modo consola el hello.prg compila sin problemas .
Eso si para el harbour que tenemos es este mismo hilo tenemos que cambiar los path del build.sh
Code (fw): Select all Collapse
 
clear
 
if [ $# = 0 ]; then
   echo syntax: ./build.sh file [options...]
   exit
fi
echo compiling...
./../../harbour/bin/harbour $1 -n -I./../../harbour/include $2
if [ $? = 1 ]; then
   exit
fi   
echo compiling C module...
gcc $1.c -c -I./../../harbour/include
echo linking...
gcc $1.o -o $1 -L./../lib -L./../../harbour/lib -lhbdebug -lhbvm -lhbrtl -lhblang -lhbrdd -lgttrm -lgtstd -lhbrtl -lhbvm -lhbmacro -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbcommon 
rm $1.c
rm $1.o
 
echo done!
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 08:51 PM
Estoy parado en la compilacion de ios.m .

He puesto los frameworks del ios3.2 ...

y me da todos estos errorres :

Code (fw): Select all Collapse
iPhone-de-manuel:~/harbour/samples root# gcc -c -I./../../harbour/include -F/usr/include ios.m
In file included from /usr/include/UIKit.framework/Headers/UIResponder.h:10,
                 from /usr/include/UIKit.framework/Headers/UIView.h:9,
                 from /usr/include/UIKit.framework/Headers/UIActivityIndicatorView.h:8,
                 from /usr/include/UIKit.framework/Headers/UIKit.h:11,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIEvent.h:30: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIEvent.h:31: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIView.h:9,
                 from /usr/include/UIKit.framework/Headers/UIActivityIndicatorView.h:8,
                 from /usr/include/UIKit.framework/Headers/UIKit.h:11,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIResponder.h:40: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIResponder.h:58: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIResponder.h:59: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIActivityIndicatorView.h:8,
                 from /usr/include/UIKit.framework/Headers/UIKit.h:11,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIView.h:190: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIView.h:220: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIApplication.h:13,
                 from /usr/include/UIKit.framework/Headers/UIKit.h:13,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIDevice.h:67: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIDevice.h:68: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIDevice.h:69: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIDevice.h:71: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIDevice.h:72: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIDevice.h:74: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:13,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIApplication.h:161: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:17,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIButton.h:86: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIButton.h:87: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIDocumentInteractionController.h:12,
                 from /usr/include/UIKit.framework/Headers/UIKit.h:23,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIViewController.h:134: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIViewController.h:135: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIViewController.h:137: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIImagePickerController.h:9,
                 from /usr/include/UIKit.framework/Headers/UIKit.h:30,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UINavigationController.h:88: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UINavigationController.h:90: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UINavigationController.h:116: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:30,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIImagePickerController.h:60: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIImagePickerController.h:64: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIImagePickerController.h:65: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIImagePickerController.h:68: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIImagePickerController.h:69: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIImagePickerController.h:70: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:31,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIImageView.h:23: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIImageView.h:26: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIImageView.h:31: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:36,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIMenuController.h:38: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIMenuController.h:40: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:37,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UINavigationBar.h:56: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:46,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIPopoverController.h:114: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIPopoverController.h:118: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:50,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIScreen.h:36: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIScreen.h:37: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:52,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIScrollView.h:159: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UIScrollView.h:196: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:53,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UISearchBar.h:57: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UISearchBar.h:58: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UISearchBar.h:62: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UISearchBar.h:69: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UISearchBar.h:70: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UISearchBar.h:71: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:62,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UITabBarController.h:69: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UITableView.h:11,
                 from /usr/include/UIKit.framework/Headers/UIKit.h:64,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UITableViewCell.h:137: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UITableViewCell.h:139: warning: 'weak_import' attribute ignored
/usr/include/UIKit.framework/Headers/UITableViewCell.h:140: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:64,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UITableView.h:324: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:66,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UITableViewController.h:29: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:71,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UITextView.h:88: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:72,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIToolbar.h:45: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:73,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UITouch.h:55: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:77,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIWebView.h:54: warning: 'weak_import' attribute ignored
In file included from /usr/include/UIKit.framework/Headers/UIKit.h:78,
                 from ios.m:1:
/usr/include/UIKit.framework/Headers/UIWindow.h:60: warning: 'weak_import' attribute ignored
iPhone-de-manuel:~/harbour/samples root#
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 09:38 PM
Solucionado Cambiando el uikit.framework 3.2 de sdk de desarrollo por el proporcionado por el blog ....( sin los includes )
ya me ha compilado ios.m ...
paso al ejemplo hello en modo "gui" ...
intento compilar y me manda unos errores que aparentemente son del build.sh ...
mi build.sh
Code (fw): Select all Collapse
# ./build.sh
 
clear
 
if [ $# = 0 ]; then
   echo syntax: ./build.sh file [options...]
   exit
fi
echo compiling...
./../../harbour/bin/harbour $1 -n -I./../../harbour/include $2
if [ $? = 1 ]; then
   exit
fi   
echo compiling C module...
gcc $1.c -c -I./../../harbour/include
echo linking...
 gcc $1.o ios.o -o $1 -F/usr/include -L./../lib -L./../../harbour/lib -lhbdebug -lhbvm -lhbrtl -lhblang -lhbrdd -lgttrm -lgtstd -lhbrtl -lhbvm -lhbmacro -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbcommon -framework CoreFoundation -framework Foundation -framework UIKit -framework CoreGraphics  
rm $1.c
rm $1.o
 
echo done!


la consola :
Code (fw): Select all Collapse
iPhone-de-manuel:~/harbour/samples root# ./build.sh hello
: command not found: 
: command not found: 
: command not found: clear
: command not found: 
./build.sh: line 65: syntax error near unexpected token `fi'
'/build.sh: line 65: `fi   
iPhone-de-manuel:~/harbour/samples root# ./build.sh hello
: command not found: 
: command not found: 
: command not found: clear
: command not found: 
./build.sh: line 65: syntax error near unexpected token `fi'
'/build.sh: line 65: `fi   
iPhone-de-manuel:~/harbour/samples root#
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 09:52 PM
Solucionado el problema del build.sh .... ahora compila y me tira estos errores:
Code (fw): Select all Collapse
compiling...
Harbour 2.1.0beta2 (Rev. 15642)
Copyright (c) 1999-2010, http://harbour-project.org/
Compiling 'hello.prg'...
Lines 12, Functions/Procedures 2
Generating C source output to 'hello.c'... Done.
compiling C module...
linking...
Undefined symbols:
聽 "_HB_FUN_CREATEPOOL", referenced from:
聽 聽 聽 _symbols_table in hello.o
聽 "_HB_FUN_CREATEAPP", referenced from:
聽 聽 聽 _symbols_table in hello.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
done!
iPhone-de-manuel:~/harbour/samples root#


Es como que no enlaza el ios.o con el resto de la aplicacion ....

por otro lado puede que se tenga que cambiar algo en el build.sh

gcc $1.o ios.o -o ./$1.app/$1 -F/usr/include ............

He investigado tambien el tema de crear archivos ipa con las aplicaciones generadas .
He cogido una aplicacion de iphone que realice para probar con el xcode y artesanalmente me he construido un archivo ipa de la aplicaci贸n .
Ahora el instalarla es tan facil como arrastrarla al itunes y sincronizar . Ma帽ana voy a intentarlo con la aplicacion que gener茅 con el ejemplo del blog a ver que me dice .
Por hoy lo dejo . Gracias por todo el interes que estas poniendo en este proyecto y a ver si alguien mas se anima.
Saludos.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 11:14 PM

He recordado que en las versiones recientes del iOS ya no es posible lanzar una aplicaci贸n gr谩fica desde el terminal y que ha de ser lanzada desde su desktop GUI (springboard).

De ahi que sea muy interesante el poder generar la aplicaci贸n y que se muestre en el springboard y que desde ah铆 la ejecutemos. Lo que estas investigando es muy util :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: he conseguido un iphone

Posted: Tue Oct 19, 2010 11:36 PM

Manuel,

Ya que tenemos las librerias de Harbour para el iOS, ahora resulta muy f谩cil construir desde Mac usando el Harbour para Mac y enlazando con las librerias de Harbour-iOS :-)

Descarga el proyecto FivePhone desde http://code.google.com/p/fivephone/ y usa samples/buildmac.sh para construir. Ha hecho el ejecutable a la primera :-)

Ahora solo falta copiarlo al iPhone/iPad en un formato que nos permita lanzarlo desde el springboard...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM

Re: he conseguido un iphone

Posted: Wed Oct 20, 2010 06:48 AM

De momento y hasta tener algo mas "concreto" unba forma de acerlo , y que funciona es usar el appinstall que viene con el ejemplo del blog ... creas una carpeta en el iphone ( la tengo en ~ ) y colocas en ella el appinstall y la aplicacion , en terminal :
./appinstall nombreapp y ya la tienes instalada para funcionar . Eso si no la puedes gestionar con el iTunes ... pero en eso estoy ahora mismo . Al medio dia cuando este en casa con mi mac intento lo de compilar con fivephone ...
Saludos.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: he conseguido un iphone

Posted: Wed Oct 20, 2010 06:51 AM

Manuel,

Lo he probado con el appinstall y se instala pero no consigo que funcione tutor01

Algo debe estar mal en el Info.plist o en la aplicaci贸n en si...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM

Re: he conseguido un iphone

Posted: Wed Oct 20, 2010 07:22 AM
como intento , he creado un ipa con el programa de ejemplo del blog que he creado desde el iphone y que funciona .
En el itunes se coloca sin problema , no se si instala en el iphone , ya que este itunes no es con el que sincronizo y no quiero liar una buena . Si tu tienes manera de probar te paso el ipa en este enlace .
http://rapidshare.com/files/426110106/TabBar.ipa
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM

Re: he conseguido un iphone

Posted: Wed Oct 20, 2010 07:42 AM
Esto es el info.plist del ejemplo que funciona .... cambialo en tutor.app a ver si va :
Code (fw): Select all Collapse
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleDisplayName</key>
    <string>TabBarSample</string>
    <key>CFBundleExecutable</key>
    <string>TabBarSample</string>
    <key>CFBundleIconFile</key>
    <string></string>
    <key>CFBundleIdentifier</key>
    <string>com.yourcompany.iphone.TabBarSample</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>TabBarSample</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIDeviceFamily</key>
    <array>
        <string>1</string>
        <string>2</string>
    </array>
</dict>
</plist>