# Clipper Summer87



## marge0512 (Oct 3, 2011)

Hello! I have never debugged in Clipper Summer87. Could someone tell me how step by step? I use Plink86 to link and link using a .bat file. 

Example of .bat:

clipper @prog -l
clipper main.prg -l -m
clipper index.prg -l -m
clipper rept.prg -m -l

plink86 @prog 

Thanks in advance!


----------



## Aftab (Oct 15, 2003)

WOW, someone who's still using summer '87! I did use Clipper 5.2e years ago, and had a little exposure to Summer '87.
I think you pass the -b parameter to create debug info:
clipper main.prg -l -m -b

and to activate the debugger I think it's CLD main.exe

I think this was how to do it with 5.2e, might be same/similar to Summer '87.


----------



## marge0512 (Oct 3, 2011)

Thanks for responding!
Yes, can you believe it? We are trying to convert all of our programs to Delphi though. It's going to be a looooooong process!!
Anyway, I tried what you posted but it still didn't work. I also tried adding AltD() before the line I wanted to start debugging (I read that somewhere) but that didn't work either. I don't know what I could be missing. Thanks again for the info though.


----------



## Aftab (Oct 15, 2003)

ALTD() can be used to stop at a particular point, but if there's no debug info it's not going to work either. Try using a .lnk file and include DEBUG.OBJ in the files to link list, I'm not sure if you can do it directly on the command line:
plink86 @main,DEBUG.OBJ. 
I'll see if I've still got any books on Clipper, I think I might have thrown them away years ago. The other thing is that when I worked with Clipper I used blinker, so it may not be the same.

Also, have alook at this link:
http://www.ousob.com/ng/sum87/ng6d62e.php


----------



## marge0512 (Oct 3, 2011)

Thanks for the info!

I have all of my .lnk files in my directory and the debug.obj but I tried the plink86 with the .lnk and debug.obj at the command line and that did not work either. I believe you are right in which using the blinker is different. The Clipper books I have use Blinker in their examples. The only reason I knew to use the .bat file to compile is because I found some old notes someone left behind. They left no notes on debugging though.


----------



## Aftab (Oct 15, 2003)

Can you post the .bat and .lnk files. I'll see if I can spot anything.


----------



## marge0512 (Oct 3, 2011)

Hello, I'm not sure what you would like me to post but the code in the bat file has:

clipper @lbrlw -l 
clipper main.prg -l -m 
clipper index.prg -l -m 
clipper rept.prg -m -l -b
clipper acct.prg -m -l 
clipper lws.prg -m -l 
clipper list.prg -m -l 
clipper regs.prg -m -l 
plink86 @lbrlw 

It is named go.bat.

Rept.prg is the actual .prg I would like to debug. The other thing I don't understand is that they have a program named lbrlw.prg and the .exe is named lbrlw.exe. I'm not sure what the first line....clipper @lbrlw -l means. I'm assuming that is the program.

The link file is named lbrlw.exe.

Thanks!


----------



## Aftab (Oct 15, 2003)

To start with remove the -l switch from each line, that removes line numbers from the object code which you need to debug. There's probably a file named lbrlw.clp (script file) which contains a list of source file names to compile. Add the -b switch to all the lines:

clipper @lbrlw -b
clipper main.prg -b -m 
clipper index.prg -b -m 
clipper rept.prg -m -b
clipper acct.prg -m -b 
clipper lws.prg -m -b 
clipper list.prg -m -b 
clipper regs.prg -m -b 

The reason the exe is named lbrlw.exe is because in the link file it is being instructed to do so.
The line plink86 @lbrlw is telling plink86 that the name of the link file is lbrlw.
Is there a file named lbrlw.lnk? If there is post the contents, because you may need to add debug.obj into the list of files to link.
Or you can try adding it yourself, open the lbrlw.lnk file and look for a section that starts with FI. After this should be a list of file names, you need to append DEBUG.
eg. FI file1,file2,DEBUG.

I think this is how it works, it was a long time ago that I used Clipper - and even then I didn't really use Summer 87/plink86 much.


----------



## marge0512 (Oct 3, 2011)

Thanks!

Wow, I thought I had .lnk files in my directory but I do not. I'm thinking of .lib files. Big difference. Everything compiles just fine in Summer87 but I can't find a way to debug but I messed around and converted this system to Harbour which compiled fine and I could debug but I had quite a few problems while using the compiled system. It seemed that quite a few functions and some other things were missing and I couldn't find where the programmer (who left years ago) had stored these.....or he may have even taken them with him. Who knows. So........I went back to the Summer87 stuff where everything was comfortable. 

When I run my go.bat file it says "Invalid Option" for -b. I tried /b and it said "Invalid Parameter". 

Could my problem be that I don't have any link files? But the system would still compile ok?


----------



## Aftab (Oct 15, 2003)

Link files are not required and the program will compile fine without them. They're used for managing builds of systems with lots of source files. If you type just "clipper" on the command line, what switches/parameters are available? I was sure -b was for debug info. As there's no link file you'll have to include debug.obj from the command line. I would try with a smaller project first so we can see if it works.

create a file called test.prg that has one function which just prints hello to the screen (@10,10 say "hello"). Also put an ALTD() in there:

ALTD()
@10,10 say "hello"

save the file

type "clipper" without any parameters on the command line to see what the switches are and note the one used to create debug info (if there is one).

then on the command line type "clipper test.prg" followed by the switch for debug info

If this went OK you'll see a file called test.obj

now type plink86 fi test.obj,debug.obj
If that throws an error try typing "plink86 fi test.obj,debug.obj LIB CLIPPER.LIB,EXTEND.LIB"

if this worked OK you'll now have a test.exe. On the command line type "CLD test.exe". From what I remember, CLD is the debugger and with this method the debugger launches your application. If it doesn't recognise CLD, just type "test.exe".


----------



## marge0512 (Oct 3, 2011)

Hello, when I typed Clipper at the command line, I got this:

The Clipper Compiler, Summer '87
Copyright (c) Nantucket Corp 1985-1987. All Rights Reserved.
Microsoft C Runtime Library Routines,
Copyright (c) Microsoft Corp 1984-1987. All Rights Reserved.

Richard McConnell & Brian Russell, Sr. VP

Kevin Shepherd Dennis Dias
Rick Spence David Dodson
Jon P. Rognerud Fred Ho

options:
-l (no <l>ine numbers)
-m (compile one <m>odule only)
-o (<o>bject file drive and/or path)
-p (

ause for disk change)
-q (


> uiet)
> -s (yntax check only)
> -v (<v>ariables are assumed M->)
> 
> ...


----------

