Lazarus

Free Pascal => Beginners => Topic started by: CzarAlex on April 20, 2018, 11:10:46 am

Title: Compiler can't find TPU files
Post by: CzarAlex on April 20, 2018, 11:10:46 am
Hello.

So I'm trying to learn how to write a BBS door. I have downloaded several example files which come with .PAS files. I go to compile them and am told I am missing .TPU files that are referenced in the example .PAS files. I have gone to my compiler options and added direct paths to the .TPU files in question but with no change.

What am I doing wrong? I'm happy to provide screen shots as needed.

Thanks!
Title: Re: Compiler can't find TPU files
Post by: marcov on April 20, 2018, 11:11:53 am
Free Pascal does not use any TPU files. You need to get everything in source.
Title: Re: Compiler can't find TPU files
Post by: CzarAlex on April 20, 2018, 11:24:44 am
I appreciate your reply but sadly, I'm too new to this to understand what that means. This shows I'm ill-prepared to venture in to this project. Thank you for your time.
Title: Re: Compiler can't find TPU files
Post by: marcov on April 20, 2018, 11:31:55 am
This forum is a for the Free Pascal compiler. The confusion might be that you use a different compiler.
Title: Re: Compiler can't find TPU files
Post by: CzarAlex on April 20, 2018, 11:40:18 am
I have downloaded Free Pascal and have run the program located at:

C:\FPC\3.0.4\bin\i386-win32\fp.exe

I have some example .PAS files I am looking to compile. When I hit F9 to use MAKE, I receive this result:

(first image attachment)

I believe I edited the directories to show where the TPU files are. But you're saying I don't use TPU files yet the compiler is looking for them. I don't understand.

(second image attachment)
Title: Re: Compiler can't find TPU files
Post by: marcov on April 20, 2018, 12:57:45 pm
I believe I edited the directories to show where the TPU files are. But you're saying I don't use TPU files yet the compiler is looking for them. I don't understand.

TPU are internal files of Turbo Pascal. Free Pascal can't use them.

Free Pascal doesn't mention TPU anywhere in the screenshot, so I don't know where you get that, it is looking for the source ( concerto.pas).

Title: Re: Compiler can't find TPU files
Post by: CzarAlex on April 20, 2018, 01:42:27 pm
True, they were not mentioned in those screenshots. I was referencing those file extensions because I used turbo Pascal 7 earlier today and receive the same error only it mentions the file extensions.
Title: Re: Compiler can't find TPU files
Post by: marcov on April 20, 2018, 01:50:35 pm
True, they were not mentioned in those screenshots. I was referencing those file extensions because I used turbo Pascal 7 earlier today and receive the same error only it mentions the file extensions.

As said, TPU are Turbo Pascal  internal files (and version specific), and FPC can't use them. You'll need source.
Title: Re: Compiler can't find TPU files
Post by: Thaddy on April 20, 2018, 01:57:18 pm
AFAIK concerto is a C library and you need to compile that first. There should be an inerface unit included that links the o file, not a TPU file.
I can't remember if I ever tried to compile it for 32 bit. It is very old software written for 16 bit DOS, so you may need to use FPC for i8086. Your luck may vary.
It is probably not an easy task.....even for advanced programmers. But if the C code compiles for 32 bit you are in luck.
Title: Re: Compiler can't find TPU files
Post by: CzarAlex on April 20, 2018, 02:23:10 pm
AFAIK concerto is a C library and you need to compile that first. There should be an inerface unit included that links the o file, not a TPU file.
I can't remember if I ever tried to compile it for 32 bit. It is very old software written for 16 bit DOS, so you may need to use FPC for i8086. Your luck may vary.
It is probably not an easy task.....even for advanced programmers. But if the C code compiles for 32 bit you are in luck.

:( I appreciate your feedback. I suppose this may be a lost cause at my novice skill level. Sadly, documentation on these old BBS doors is hard to come by and if it is found, the techniques/software used is ancient and equally as hard to find or unavailable OR requires registration to some defunct email/FIDO net address.

If you do have any pointers for me, I'd be very eager and grateful to hear them.
Title: Re: Compiler can't find TPU files
Post by: Thaddy on April 20, 2018, 02:33:02 pm
This one compiles -with fpc in mode TP - for 32 bit windows:
https://sourceforge.net/projects/freedoor/files/freedoor/Freedoor%201.60/fdoor160.zip/download

and is written in pure pascal.
Just make sure you have a 32 bit version of FPC installed.
Title: Re: Compiler can't find TPU files
Post by: CzarAlex on April 20, 2018, 02:49:16 pm
You are an awesome human being! Thank you for taking the time to check that package out and see if it compiles. Later today, I'll take a stanb at it and report back!
Title: Re: Compiler can't find TPU files
Post by: Thaddy on April 20, 2018, 02:54:05 pm
You are an awesome human being! Thank you for taking the time to check that package out and see if it compiles. Later today, I'll take a stanb at it and report back!
You don't actually need mode TP. It also compiles in default mode. I just tried it. There may be some small problems but easy to fix. It has already been modified to compile with FPC albeit an old version from 2002.
Title: Re: Compiler can't find TPU files
Post by: CzarAlex on April 20, 2018, 10:11:33 pm
Thaddy, were you trying to compile Example.pas? I loaded that up and received this error. Seems similar to my others.

EDIT: I set up some directory paths to and solved that error but new ones keep popping up. Ugh..
Title: Re: Compiler can't find TPU files
Post by: taazz on April 21, 2018, 10:22:10 am
Rename result with the name of the function they are in. Result is a construct of newer incarnations of the language than TP. Or simple use a more modern mode ({$Mode objFPC} or {$Mode Delphi})
Title: Re: Compiler can't find TPU files
Post by: Thaddy on April 21, 2018, 12:26:46 pm
Rename result with the name of the function they are in. Result is a construct of newer incarnations of the language than TP. Or simple use a more modern mode ({$Mode objFPC} or {$Mode Delphi})
Not necessary. Simply add {$modeswitch result} on top of affected units. I hinted already at some little problems, but the code itself simply works in both 16 and 32 bit Freepascal. I didn't test 64 bit, though. (probably won't work, it is soooo old). {$mode delphi} is also OK it seems. The code is Delphi 2 compatible.
TinyPortal © 2005-2018