Results 1 to 38 of 38

Thread: Borland and EditPlus

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Borland and EditPlus

    I'm having trouble getting the Borland compiler to work. I have it setup as an addin for EditPlus, and I get like 13 errors in my code.

    ---------- Compile (Borland) ----------
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    gotoxy.cpp:
    Error E2209 gotoxy.cpp 1: Unable to open include file 'iostream'
    Error E2209 gotoxy.cpp 2: Unable to open include file 'windows.h'
    Error E2282 gotoxy.cpp 3: Namespace name expected
    Error E2268 gotoxy.cpp 8: Call to undefined function 'printxy' in function main()
    Error E2451 gotoxy.cpp 9: Undefined symbol 'cout' in function main()
    Error E2451 gotoxy.cpp 9: Undefined symbol 'endl' in function main()
    Error E2451 gotoxy.cpp 14: Undefined symbol 'COORD' in function gotoxy(int,int)
    Error E2379 gotoxy.cpp 14: Statement missing ; in function gotoxy(int,int)
    Error E2451 gotoxy.cpp 15: Undefined symbol 'coord' in function gotoxy(int,int)
    Error E2451 gotoxy.cpp 18: Undefined symbol 'HANDLE' in function gotoxy(int,int)
    Error E2379 gotoxy.cpp 18: Statement missing ; in function gotoxy(int,int)
    Error E2268 gotoxy.cpp 19: Call to undefined function 'SetConsoleCursorPosition' in function gotoxy(int,int)
    Error E2451 gotoxy.cpp 19: Undefined symbol 'hConsole' in function gotoxy(int,int)
    Warning W8057 gotoxy.cpp 20: Parameter 'x' is never used in function gotoxy(int,int)
    Warning W8057 gotoxy.cpp 20: Parameter 'y' is never used in function gotoxy(int,int)
    *** 13 errors in Compile ***
    Normal Termination
    Output completed (0 sec consumed).
    What have I done wrong?
    Last edited by The Hobo; Nov 22nd, 2002 at 02:27 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Does the borland compiler have all of the header files in the same directory, on in its PATH? BTW, I don't know how to check those, but that looks like the case.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I just did the standard installation, didn't change anything.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    did you set up the .cfg files for the compiler and linker? if i remember correctly, the instructions are somewhere in the readme.

    [edit]
    on a second look through, it is probably the config files that are missing. what they do is set the paths to the header and library directories for the compiler and linker to use.
    [/edit]

    here is my tool setting for editplus to compile:

    command : c:\path_to\bin\bcc32.exe

    arguement: -n$(FileDir) $(FilePath)

    initail directory: c:\path_to\BCC55\bin\

    capture output is checked
    Last edited by Kagey; Nov 20th, 2002 at 10:40 PM.

  5. #5

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Thanks for your help, Kagey. I did setup the two .cfg files as per the instructions said. Perhaps I put them in the wrong directory. Where are they supposed to go? I have them in C:\Borland\BCC55 right now.

    I'll see if my settings match yours...

    I switched it to yours and now I have:

    ---------- Compile (Borland) ----------
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    Error E2194: Could not find file 'Guitar.cpp'
    Error E2194: Could not find file 'Hobo\Programming\Cpp.cpp'
    Error E2194: Could not find file 'Stuff\gotoxy.cpp'
    Error E2194: Could not find file 'C:\Download\The.cpp'
    Error E2194: Could not find file 'Guitar.cpp'
    Error E2194: Could not find file 'Hobo\Programming\Cpp.cpp'
    Error E2194: Could not find file 'Stuff\gotoxy\gotoxy.cpp'
    Normal Termination
    Output completed (0 sec consumed).
    My evil laugh has a squeak in it.

    kristopherwilson.com

  6. #6
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    the files have to go into the bin folder.

    go back to your other settings, mine dont seem to be working for you

  7. #7

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Kagey
    the files have to go into the bin folder.

    go back to your other settings, mine dont seem to be working for you
    Presto!

    Making progress, yet now I have:

    ---------- Compile (Borland) ----------
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    gotoxy.cpp:
    Error E2133: Unable to execute command 'ilink32.exe'
    Normal Termination
    Output completed (8 sec consumed).
    I'm going to check and see if I messed up the config file real quick.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  8. #8

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    hmm...not seeing anything that looks wrong.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  9. #9
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    if you initial folder isnt the bin folder, then add the bin folder path to the path environment variable.

    umm, that was confusing, but i think you know what i mean

    [edit]
    clarification: since it is obvious that the initial path (in the editplus tool settings) isnt the bin folder, the compiler is trying to call the linker, thinking it is in the current path (i think), so if you add the bin path to the environment variable, then when it calls link32.exe, it will find the exe.

    thats why in my editplus settings, i have the bin folder as the initial folder, so i didnt have to add it to the path variable. you might want to play around with my settings to try and get them to work if you dont want to bother with the path variable. -n sets the output dir for the compiler/linker i think.
    [/edit]
    Last edited by Kagey; Nov 20th, 2002 at 10:58 PM.

  10. #10

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Nothing is working
    My evil laugh has a squeak in it.

    kristopherwilson.com

  11. #11
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    from the editplus faq:
    Example 3. Borland C++ 5.5

    Menu text: Borland C
    Command: c:\bc\bin\bcc32.exe
    Argument: -Ic:\bc\include -Lc:\bc\lib -n$(FileDir) $(FilePath)
    Initial directory: c:\bc\bin
    Capture output: ON
    what are the errors you are getting? or are they the same as the last errors you said?

  12. #12

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Kagey
    from the editplus faq:


    what are the errors you are getting? or are they the same as the last errors you said?
    I'm getting the last error that I posted above. When I go with that example you just posted, I these errors again:

    ---------- Compile (Borland) ----------
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    Error E2194: Could not find file 'Guitar.cpp'
    Error E2194: Could not find file 'Hobo\Programming\Cpp.cpp'
    Error E2194: Could not find file 'Stuff\gotoxy.cpp'
    Error E2194: Could not find file 'C:\Download\The.cpp'
    Error E2194: Could not find file 'Guitar.cpp'
    Error E2194: Could not find file 'Hobo\Programming\Cpp.cpp'
    Error E2194: Could not find file 'Stuff\gotoxy\gotoxy.cpp'
    Normal Termination
    Output completed (0 sec consumed).
    My evil laugh has a squeak in it.

    kristopherwilson.com

  13. #13
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    ***? are you trying to compile a bunch of files at once? just try one.

  14. #14

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Kagey
    ***? are you trying to compile a bunch of files at once? just try one.
    Just one. File is: "C:\Download\The Guitar Hobo\Programming\C++ Stuff\gotoxy\gotoxy.cpp"

    It probably has something to do with the spaces, but when I have the settings I had before, it works just fine.

    I've screwed around with different variations so much, and it's still not working. It either gives me the last error or says no file name given.

    I just realized I don't have the latest version. I have 2.10. So I'm going to update and see if that helps...
    My evil laugh has a squeak in it.

    kristopherwilson.com

  15. #15
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    yes, thats it. it thinks that the spaces are there to separate different source files. do a file in a path without spaces and it will probably work, as you have already suggested.

    i'm heading off to bed now, but it is for sure the spaces in the folder names. i'm sure there is a way around. I'm also sure that you know how to find out information about that
    Last edited by Kagey; Nov 20th, 2002 at 11:37 PM.

  16. #16
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    i thought of something else

    now that you have the bin path in the environment variable, try these settings:


    Command: bcc32.exe
    Argument: $(FileName)
    Initial directory: $(FileDir)
    Capture output: ON

  17. #17
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Try putting quotes round the individual file names.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  18. #18

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by parksie
    Try putting quotes round the individual file names.
    I've tried, but then it just tells me no file name given.

    I guess I'm going to have to go with a folder that doesn't have spaces in it.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  19. #19

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Yeah. Now it works fine without the spaces...

    But I want spaces, damnit.

    Oh well. Thanks for all your help Kagey and Parksie.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  20. #20

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    What are the "options" that EditPlus passes to Borland?

    Or, I should probably say, what options should I pass to it?

    I know it's bcc32 [option(s)] [file(s)]

    But what should be put for the options?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  21. #21

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by The Hobo
    What are the "options" that EditPlus passes to Borland?

    Or, I should probably say, what options should I pass to it?

    I know it's bcc32 [option(s)] [file(s)]

    But what should be put for the options?
    What switch is used to pass the "Initial Directory" to the compiler?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  22. #22
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    i took a look at the options available, and an initial directory option isnt there. (closest one is the -n, output directory)

    the initial directory option in editplus simply changes the working directory in a console and then calles the command with the options specified.

  23. #23

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I'm trying to make a VB Program to make using Borland easier for me...

    ...would you know how to "changes the working directory" in the console?

    Right now, this is what I'm using:

    C:\borland\bcc32.exe -nC:\longpath -IC:\borland\Include -LC:\borland\Link "C:\longpath\gotoxy.cpp"
    But it's giving me the "unable to execute ilink32.exe" again.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  24. #24
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    well,what i mean is, editplus just cd's to the intial path specified, then executes the command specified.

  25. #25

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Kagey
    well,what i mean is, editplus just cd's to the intial path specified, then executes the command specified.
    So why doesn't it work for me, then? If the console id "CD'd" to the Initial Path anyways (which is the Borland directory).

    Why does this stuff have to be so complicated?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  26. #26

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Got it!

    I'm using JoshT's code from here. I just noticed there was a "ByVal lpCurrentDirectory As String" in CreateProcess. Popped in the "Initial Directory" value and bing! Works.

    Thanks for your help, again, Kagey.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  27. #27
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    unless this is a typo:
    C:\borland\bcc32.exe -nC:\longpath -IC:\borland\Include -LC:\borland\Link "C:\longpath\gotoxy.cpp"

    the path should be to the bin folder, not just the borland root. maybe that was giving you problems using straight editplus config int he first place?
    so it would be:
    C:\borland\bin\bcc32.exe -nC:\longpath -IC:\borland\Include -LC:\borland\Link "C:\longpath\gotoxy.cpp"

  28. #28

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Kagey
    unless this is a typo:
    C:\borland\bcc32.exe -nC:\longpath -IC:\borland\Include -LC:\borland\Link "C:\longpath\gotoxy.cpp"

    the path should be to the bin folder, not just the borland root. maybe that was giving you problems using straight editplus config int he first place?
    It is to the bin folder. I actually just shorted everything up (ie "longpath") so that I wouldn't cause a wide document when people viewed this thread.

    Because the text itself would have been really long, and was when I originally posted it.

    Know what I mean?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  29. #29
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    oh yeah i get it, sorry.

    glad you got something working man

  30. #30

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I've spent almost all day working on this (I had some problem showing the console like MSVC++ does it), but it's almost presentable!

    Give this a look and let me know what you think.

    (Note: Borland Compiler is required for this)

    Edit: Attachment removed until I find out whether or not Jupitermedia will own it if I post it.
    Last edited by The Hobo; Nov 21st, 2002 at 07:50 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  31. #31

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I know have it so that it (my program I made) accepts filenames with spaces in them (by converting them to the short DOS name).

    If anybody has an interest in checking it out, just let me know. It's pretty nifty.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  32. #32
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Why is that necessary? All the functions in the Win32 API (except the really old ones) accept long file names, and passing them to a program is no problem if you put them in quotes.

    Plus, NTFS doesn't have short names...
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  33. #33

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by parksie
    Why is that necessary? All the functions in the Win32 API (except the really old ones) accept long file names, and passing them to a program is no problem if you put them in quotes.

    Plus, NTFS doesn't have short names...
    I didn't make the compiler, so I don't know.

    I just know I had a hell of a time trying to get it to work on anything when I have spaces in the path. Quotes around it didnt' help at all.

    C:\Borland\BCC55\Bin\bcc32.exe -nC:\Download\The Guitar Hobo\Programming\Cpp Stuff\Final Exam\gpa "C:\Download\The Guitar Hobo\Programming\Cpp Stuff\Final Exam\gpa\gpa.cpp"
    Gave me crazy errors (see them above), and:

    C:\Borland\BCC55\Bin\bcc32.exe -n"C:\Download\The Guitar Hobo\Programming\Cpp Stuff\Final Exam\gpa" "C:\Download\The Guitar Hobo\Programming\Cpp Stuff\Final Exam\gpa\gpa.cpp"
    Says no file name given.

    So in order to set the output file directory, it has to be short name.

    I don't know why, but if you have an alternative solution, I'm all ears.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  34. #34
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Um, use a real compiler?

    BCC should be 32-bit, so it shouldn't have any difficulty *shrug* Can't test anything anyway...
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  35. #35

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by parksie
    Um, use a real compiler?
    Yeah. Thanks for your help.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  36. #36
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    That was *supposed* to be a joke
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  37. #37

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by parksie
    That was *supposed* to be a joke
    You could have atleast suggested what a *real* compiler would be.

    I don't care. It works for me. It compilers programs. I'm just trying to break free of piracy. Hey...that ryhmes. It could be a political slogan! I'm runnin' for office!
    My evil laugh has a squeak in it.

    kristopherwilson.com

  38. #38
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Well, using Cygwin and GCC 3 would probably be the best solution
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width