compilare harbour-clipper sorgenti

Forum dedicato ai programmatori di X# in lingua italiana – Italian language forum

Moderator: wriedmann

Boerig
Posts: 8
Joined: Mon May 29, 2017 3:15 pm

compilare harbour-clipper sorgenti

Post by Boerig »

Ciao a tutti, solo per curiosita': e' possibile compilare vecchi prg clipper/harbour in modalita' console con xsharp? Ho scaricato xSharp, installato xide e provato a compilare un vecchissimo prg, ma il compilatore indicava che nella modalita' core non era possibile compilare alcune istruzioni. Ho cercato nel sito e trovato una tabella comparativa dei diversi dialetti, ma in xide non ho trovato la possibilita' di indicare la mia preferenza. In passato ho posseduto Visua Object (usato pochissimo, solo qualche occhiata), mai avuto Vulcan e non ho installato Visual Studio.
User avatar
Chris
Posts: 4573
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

compilare harbour-clipper sorgenti

Post by Chris »

Hi Boerig,

First of all, you must have created a real app (not just compiling a standalone .prg file) with Project..Create New...Application. If you have done this, select Application -> Properties and in the General page, in the top right you can choose the dialect, choose <Harbour>. You will also need to add references to the XSharp.Core and XSharp.RT dlls.

Probably the easiest way is to just create a New app with Project -> Create New -> Create New Application and select the template "X# runtime application". Then change the dialect to <Harbour> and you are good to go.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Boerig
Posts: 8
Joined: Mon May 29, 2017 3:15 pm

compilare harbour-clipper sorgenti

Post by Boerig »

Thank you Chris. with your instructions I was able to compile the "Hello x# runtime". I'm not familiar with this compiler organization: as I wrote I played for a while with VO but I dropped soon. I'm not a professional programmer but sometimes I've to resolve some software problems, so I think to start with compiling old clipper-harbour sources and try to learn step-by-step to do complex X# applications.
User avatar
wriedmann
Posts: 3649
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

compilare harbour-clipper sorgenti

Post by wriedmann »

Ciao,
purtroppo nei tempi di oggi non è più indicato lavorare con rmake e il compilatore a riga di commando (anche se rimane sempre possibile), ma meglio usare un ambiente di sviluppo che toglie molto lavoro di gestione programmi.
XIDE secondo me è molto più indicato per chi arriva di Clipper (con Harbour non ho mai lavorato, sono arrivato a X# tramite VO).
Comunque spero che qui nel forum troverai le risposte che cerchi, anche se non sempre immediatamente.
Saluti
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Boerig
Posts: 8
Joined: Mon May 29, 2017 3:15 pm

compilare harbour-clipper sorgenti

Post by Boerig »

Sto incontrando una serie di errori che non capisco. sto cercando di eliminarli, commentando le righe, ma non va. Anzitutto set date italian genera errore, ma per il momento non importa. Piu' importante sono le istruzioni di posizionamento sullo schermo, quelle con @ per intenderci. Mi pare di capire che non funzionano: se e' cosi' non ha senso ricompilare un programma harbour visto che la quasi totalita' delle app in modalita' consele (scritte in clipper-harbour) hanno queste istruzioni all'interno.
User avatar
wriedmann
Posts: 3649
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

compilare harbour-clipper sorgenti

Post by wriedmann »

Ciao,
purtroppo non so se le istruzioni @say e @get sono supportate dal runtime corrente.
So di certo che Robert e Chris qualche anno fa hanno lavorato con un cliente per portare un applicativo Harbour verso X#, ma non so a quale punto siano disponibili le relative librerie che implementano questa funzionalità.
@Chris: are these instructions supported in the current runtime?
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Boerig
Posts: 8
Joined: Mon May 29, 2017 3:15 pm

compilare harbour-clipper sorgenti

Post by Boerig »

Grazie Wolfang, immagino non sia possibile, infatti. Non capisco la compatibilita' col dialetto pero', se non sono supportate tutte le caratteristiche. Pazienza faro' in un altro modo
User avatar
Chris
Posts: 4573
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

compilare harbour-clipper sorgenti

Post by Chris »

Everything is possible :)
How large is your app? Can you zip and send it (all the prg and any accompanying make, include etc files) to me to have a look? Almost everything should be possible to compile in X# actually...
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
wriedmann
Posts: 3649
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

compilare harbour-clipper sorgenti

Post by wriedmann »

Ciao,
solo per chiarire il discorso del dialetto:
tra i vari prodotti xBase ci sono vari dialetti, non completamente compatibili tra di loro, e la scelta del dialetto attiva diversi comportamenti.
Un altra cosa sono le funzioni che si trovano nelle librerie: per VO abbiamo compatibilità molto alta perchè il team di sviluppo ha accesso alle sorgenti di quasi tutte le librerie e ha potuto ricompilarli - e bisogna dire che sono ormai anni che ci hanno lavorato.
Su FoxPro invece, una buona parte del linguaggio è supportato, ma manca ancora qualche parte non indifferente delle librerie.
Per Harbour non ne sono al corrente.
Comunque penso che oggi sarà difficile sopravivere con un interfaccia tipo console perchè gli utenti raramente lo accettano.
Quello che consiglio sarebbe di creare qualche applicazione Windows Forms e metterci dietro la logica che hai nel codice Harbour.
Il vero capitale secondo me e la "business logic", e quella la riesci a copiare, o comunque riprendere senza riscrivere.
Saluti
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4573
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

compilare harbour-clipper sorgenti

Post by Chris »

Wolfgang,

We have created some experimental libraries that convert console type interface to windows forms, with almost zero changes required in the existing harbour code. But I need to see the code to tell for sure if this is a viable option in this particular case.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Post Reply