Page 1 of 1

Compiler / Linker directives ...

Posted: Fri Dec 31, 2010 3:32 pm
by DenCo
Hello everyone and Happy New Year !

As some of you know,, I'm brand new.. Just yesterday I installed HMG 3035 ,,,

I like the IDE,,, It's going to be fun..

At this time,, I've tried to compile "Console" of some older and simple clipper applications...

For fun,, I did use the IDE to build with,,, I changed the settings to Console = .t. ,,, etc ...

I loaded in my program files to a project,, etc ... Created a "Function Main" in the parent program etc ...

I never get an executable ,,,,

I get a lot of errors like Multiple definition of "every program file name in the project".

Then errors like First Defined Here "every program file name in the project" .

I keep getting those two errors ... over and over in a long list until the file names run out...

On the program I'm trying to compile,, It's old and simple ... Very 87 ish ...

It does have a procedure file with both procedures and functions .... (utilities,, file opening routines,, Tbrowse, etc.)

Is there a list somewhere of compiler and linker error codes,, switches,, directives,, explanations ?

Thanks,, and be patient with me please,, if I ever get going I'll have a lot to offer back ...

Code: Select all

// file name loto.prg
function Main

   store 0 to pexit
   do while .t.
      clos data
      if pexit <> 0
         exit
      endif
      *clear memory
      set procedure to lotoidex   //Procedure file
      do setsys // setup directories and paths  
      set century on
      if date()+365 > ctod("01/01/2000")
         set epoch to 1990
      endif
      if date()+365 > ctod("01/01/2100")
         set epoch to 2090
      endif
      if date()+365 > ctod("01/01/2200")
         set epoch to 2190
      endif
      store 0 to pexit
      
      mPassUser := " "
      *   mPassUser := getpass("CHESS","m:","sox")
      if mPassUser = "NO"
         mac_err("System will shut down") // function in procedure file
         pexit := 2
         exit
      endif   
   
        *   do cmsck
        *   if pexit = 10
        *      mac_err("Records Coming In.. Retry Later..")
        *      exit
        *   endif
        *   if pexit = 9
        *      mac_err(qdrive+"\"+qdir+" Invalid! Retry.")
        *      exit

        *   endif
      do paint  // screen clean and colors
      store 0 to pstable
      store 0 to pmenu
      store 0 to pexit
      do bar  // drop down menu
   * The "bar"menu works simple.
   * if mchoice = 1
   *   do prog1
   *endif
   * if mchoice = 2
   *   do prog2
   *endif
 
   enddo
   clos data
   setcolor("w/")
   clear
return

Re: Compiler / Linker directives ...

Posted: Fri Dec 31, 2010 5:40 pm
by Rathinagiri
Hi Bill,

Thanks for trying HMG.

As you have already added all the files in the project, I think you have to remove 'set procedure to' entries in your prg files.

Here you can get the compiler directives of Harbour.

http://www.harbour-project.org/doc/compileroptions.htm

Since IDE makes use of HBMake, you can see the doc of Harbour.

Re: Compiler / Linker directives ...

Posted: Fri Dec 31, 2010 6:56 pm
by DenCo
Thank You Rathinagiri,,,

Yes,, I'm glad I found HMG.. I will be staying with it..

The samples are amazing and a self teaching guide by itself.

While I'm now playing around with "Console" mode, just to learn things,,,

I'll actually be converting the old programs to HMG GUI projects...

Most of my programs share a common format (layout) ,, So, once I ever convert one of them,
and get it featured like I want,, the others should be easy.

Right now I'm trying to study the different file browsing / Edit methods and tools.

My old programs use Clipper's Tbrowse object a lot ... I made a function with TBrowse back in 1990.

Most anytime I'm showing the user some data,, I'm using my Tbrowse function.. I then use alt+(key) to pop up various tools and user processes,,, ie. Alt-P = print ,,, Alt-S = Search ,, etc.etc.

So,, in a lot of ways,, my TBrowse object is basically my "Front End" of the entire program ....

It has been 100% reliable ...

I've studied Edit.Extended in the "Samples" folder.. It looks really good, and actually looks a lot like my Tbrowse.

I've mentioned this because I would like advise on what my best (most powerful) options are for data browsing...

Thanks again,,
Bill

Re: Compiler / Linker directives ...

Posted: Fri Dec 31, 2010 7:28 pm
by esgici
Hi Bill

In my humble opinion, isn't the best way for starting to HMG by converting old Clipper programs.

We know fully (except some forgotten points ;) ) our old programs, but for a adequate conversion we need also know HMG.

And without this knowledge it's difficult having a successful migration.

Working in console mode also haven't any easiness.

Moreover, the OSs, especially Win, in every new version, doesn't support console mode as usual.

So, my suggestion is: start directly HMG samples. You will see that almost everything is different between conventional and windows style programing.

After an adequate knowledge on HMG and Windows programing you will convert more easily your old program to the new field.

Again, only my opinion.

Happy HMG'ing :D

Regards

--

Esgici

Re: Compiler / Linker directives ...

Posted: Fri Dec 31, 2010 8:08 pm
by DenCo
Thanks Esgici,,

Yes,, I'll certainly study and work with the samples.. I am enjoying them ..

I understand your comments about getting started.. After only 1.5 days of study I really don't know enough yet to
even ask the right questions ! :D

Over the years I've written several windows programs,,, Delphi / VB ... They run great, I just didn't like the tools and methods that it took to make them !

Also, I could see the conversion process was going to be a complete re-design,, data engines and all ...

I do find the HMG to be tuned to the task at hand,, (data) without a lot of "whistles and bells" that are not needed.

I'll keep studying and I appreciate the kind help I am receiving here.

Bill

Re: Compiler / Linker directives ...

Posted: Fri Dec 31, 2010 8:22 pm
by esgici
DenCo wrote: Over the years I've written several windows programs,,, Delphi / VB ...
Wow !

This is a big advantage ;)
DenCo wrote: Also, I could see the conversion process was going to be a complete re-design,, data engines and all ...
Also ...
DenCo wrote: I do find the HMG to be tuned to the task at hand,, (data) without a lot of "whistles and bells" that are not needed.
Fully agreed.
DenCo wrote: I'll keep studying and I appreciate the kind help I am receiving here.
Please don't hesitate for asking anything.

Personally I will work to respond, as long as I know the answer ;)

Regards

--

Esgici