1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Clipper Summer87

Discussion in 'Software Development' started by marge0512, Oct 3, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. marge0512

    marge0512 Thread Starter

    Joined:
    Oct 3, 2011
    Messages:
    7
    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!
     
  2. Aftab

    Aftab

    Joined:
    Oct 15, 2003
    Messages:
    72
    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.
     
  3. marge0512

    marge0512 Thread Starter

    Joined:
    Oct 3, 2011
    Messages:
    7
    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.
     
  4. Aftab

    Aftab

    Joined:
    Oct 15, 2003
    Messages:
    72
    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
     
  5. marge0512

    marge0512 Thread Starter

    Joined:
    Oct 3, 2011
    Messages:
    7
    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.
     
  6. Aftab

    Aftab

    Joined:
    Oct 15, 2003
    Messages:
    72
    Can you post the .bat and .lnk files. I'll see if I can spot anything.
     
  7. marge0512

    marge0512 Thread Starter

    Joined:
    Oct 3, 2011
    Messages:
    7
    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!
     
  8. Aftab

    Aftab

    Joined:
    Oct 15, 2003
    Messages:
    72
    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.
     
  9. marge0512

    marge0512 Thread Starter

    Joined:
    Oct 3, 2011
    Messages:
    7
    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?
     
  10. Aftab

    Aftab

    Joined:
    Oct 15, 2003
    Messages:
    72
    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".
     
  11. marge0512

    marge0512 Thread Starter

    Joined:
    Oct 3, 2011
    Messages:
    7
    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 (<p>ause for disk change)
    -q (<q>uiet)
    -s (<s>yntax check only)
    -v (<v>ariables are assumed M->)

    @list.clp (list of files to compile)

    A>clipper a:main.prg -p -ob:
    C>clipper @list.clp -l -q

    When I type plink86 fi test.obj,debug.obj a menu appears (which looks like a debugging menu) that allows me to "Go", "Go Animation", "Go Key", "Single Step", etc.

    Selecting any of these shows......."hello". Now, when I try this with my application, it doesn't work. I'm going to play around with this and try some different things and see what I get now that i see that this works with the test.exe.

    Thanks!
     
  12. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1020512

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice