0

I have some old codes which I use for my database. I wrongly deleted the EXE files and now I only have some .BAT files for Clipper. The PRG files of my program which contains the source codes, and other files (DBF, NTX, ...).

How to make the exe files again? I found only a command to compile the PRG.

clipper myfile.prg
Ross Ridge
  • 38,414
  • 7
  • 81
  • 112
Baha Baghdadi
  • 29
  • 1
  • 1
  • 11
  • You need Clipper's compiler and linker and libraries, as well as all of the other source files (including those that are part of Clipper itself). You should learn to be much more careful about what you're deleting, and this should also be a really good lesson about the importance of making backups. – Ken White May 07 '16 at 14:29
  • I have the compiler but don't know what the linker is and how to link :/ the program was made 10 years ago.. – Baha Baghdadi May 07 '16 at 14:31
  • We're not a tutorial site to teach you how to program. There are used books out there about using Clipper. Most Clipper programmers used a make file to build their programs. – Ken White May 07 '16 at 14:33
  • I'm saying that I forgot the command since I'm not using clipper anymore... The BAT I made to update were converted to EXE, but I already had them deleted.. – Baha Baghdadi May 07 '16 at 14:36
  • The Clipper compiler is cl.exe, and IIRC the default linker was plink.exe, although it was horribly slow and most devs replaced it with a third-party linker named Blinker. I can't give you the *command*, since you have to know all of the .prg file names to compile them, and then the individual .obj and .iib file names necessary to link together to create the .exe. As I said, a great way to teach yourself the importance of backing up your important files. – Ken White May 07 '16 at 14:41
  • I just made a BAT with this code: clipper %1 if not errorlevel 1 plink86 fi %1 lib clipper.lib, easytime.lib, extend.lib, overlay.lib it should work but it does not :/ – Baha Baghdadi May 07 '16 at 14:44
  • 1
    I can't help you with that, because I know nothing about the source code or your application. You'll need to figure it out yourself from here. Have you started the backup of the rest of the files on your system yet? – Ken White May 07 '16 at 14:46

3 Answers3

0

Execute:

  • clipper test.prg test.obj
  • blinker fi test.obj test.exe

if you have dependencies, check on your .rmk file.

  • touch project.rmk
  • rmake project.rmk

hope this helps

Eman Jayme
  • 230
  • 2
  • 8
  • I use plink86 ... Also when I used these commands it gave me errors : Symbol INITCOL was accessed from Module ZMENU File ZMENU.OBJ Symbol LIGNAID was accessed from Module ZMENU File ZMENU.OBJ ZMENU.OBJ Symbol CONFIRM was accessed from Module ZMENU File ZMENU.OBJ Symbol SETCOLOR was accessed from Module ZMENU File ZMENU.OBJ Symbol DBEDIT was accessed from Module ZMENU File ZMENU.OBJ Symbol ALLTRIM was accessed from Module ZMENU File ZMENU.OBJ Symbol RAT was accessed from Module ZMENU File ZMENU.OBJ Symbol VALIDATION was accessed from Module ZMENU File ZMENU.OBJ – Baha Baghdadi Jun 28 '16 at 16:04
  • looks like you are accessing a defined constant. Check those variables in your zmenu.prg if you cant find it there, then you have to find it somewhere in other .prg files, compile it together. – Eman Jayme Jun 30 '16 at 03:24
0

When using clipper to compile and plink86 to link, you need to also specify the clipper libraries. For example, if the only .prg file you are working on is zmenu.prg, then you would first:

clipper zmenu.prg

And then to link it:

plink86 fi zmenu lib clipper, extend

That's off the top of my head, but it should be close. If you can get your hands on a clipper manual I know it has more details on how to do this in the apendix of the manual.

I preferred linkfiles myself, but I dont remember the format. Then you just had to do:

plink86 @linkfile

So if you were doing compiling and testing a lot, it was easy to do without having to type the longer command each time.

I hope this helps. Wow, dusting off my clipper cobwebs :)

R. Smith
  • 551
  • 4
  • 10
0

Very old question, but just to clarify in case anybody else has this issue, any MS compatible linker will work. You don't need a "Clipper" linker.

David Richardson
  • 123
  • 1
  • 1
  • 8