|
-
Nov 20th, 2002, 09:58 PM
#1
Thread Starter
Stuck in the 80s
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.
-
Nov 20th, 2002, 10:16 PM
#2
Good Ol' Platypus
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)
-
Nov 20th, 2002, 10:18 PM
#3
Thread Starter
Stuck in the 80s
I just did the standard installation, didn't change anything.
-
Nov 20th, 2002, 10:35 PM
#4
Hyperactive Member
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.
-
Nov 20th, 2002, 10:45 PM
#5
Thread Starter
Stuck in the 80s
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).
-
Nov 20th, 2002, 10:47 PM
#6
Hyperactive Member
the files have to go into the bin folder.
go back to your other settings, mine dont seem to be working for you
-
Nov 20th, 2002, 10:51 PM
#7
Thread Starter
Stuck in the 80s
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.
-
Nov 20th, 2002, 10:52 PM
#8
Thread Starter
Stuck in the 80s
hmm...not seeing anything that looks wrong.
-
Nov 20th, 2002, 10:52 PM
#9
Hyperactive Member
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.
-
Nov 20th, 2002, 11:08 PM
#10
Thread Starter
Stuck in the 80s
Nothing is working
-
Nov 20th, 2002, 11:10 PM
#11
Hyperactive Member
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?
-
Nov 20th, 2002, 11:14 PM
#12
Thread Starter
Stuck in the 80s
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).
-
Nov 20th, 2002, 11:22 PM
#13
Hyperactive Member
***? are you trying to compile a bunch of files at once? just try one.
-
Nov 20th, 2002, 11:26 PM
#14
Thread Starter
Stuck in the 80s
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...
-
Nov 20th, 2002, 11:31 PM
#15
Hyperactive Member
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.
-
Nov 21st, 2002, 07:51 AM
#16
Hyperactive Member
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
-
Nov 21st, 2002, 08:42 AM
#17
Monday Morning Lunatic
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
-
Nov 21st, 2002, 09:29 AM
#18
Thread Starter
Stuck in the 80s
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.
-
Nov 21st, 2002, 09:33 AM
#19
Thread Starter
Stuck in the 80s
Yeah. Now it works fine without the spaces...
But I want spaces, damnit.
Oh well. Thanks for all your help Kagey and Parksie.
-
Nov 21st, 2002, 09:59 AM
#20
Thread Starter
Stuck in the 80s
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?
-
Nov 21st, 2002, 11:38 AM
#21
Thread Starter
Stuck in the 80s
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?
-
Nov 21st, 2002, 12:51 PM
#22
Hyperactive Member
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.
-
Nov 21st, 2002, 12:54 PM
#23
Thread Starter
Stuck in the 80s
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.
-
Nov 21st, 2002, 12:57 PM
#24
Hyperactive Member
well,what i mean is, editplus just cd's to the intial path specified, then executes the command specified.
-
Nov 21st, 2002, 01:31 PM
#25
Thread Starter
Stuck in the 80s
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?
-
Nov 21st, 2002, 01:58 PM
#26
Thread Starter
Stuck in the 80s
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.
-
Nov 21st, 2002, 02:06 PM
#27
Hyperactive Member
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"
-
Nov 21st, 2002, 02:09 PM
#28
Thread Starter
Stuck in the 80s
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?
-
Nov 21st, 2002, 02:14 PM
#29
Hyperactive Member
oh yeah i get it, sorry.
glad you got something working man
-
Nov 21st, 2002, 06:52 PM
#30
Thread Starter
Stuck in the 80s
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.
-
Nov 21st, 2002, 11:22 PM
#31
Thread Starter
Stuck in the 80s
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.
-
Nov 22nd, 2002, 07:21 AM
#32
Monday Morning Lunatic
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
-
Nov 22nd, 2002, 02:25 PM
#33
Thread Starter
Stuck in the 80s
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.
-
Nov 22nd, 2002, 02:30 PM
#34
Monday Morning Lunatic
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
-
Nov 22nd, 2002, 02:37 PM
#35
Thread Starter
Stuck in the 80s
Originally posted by parksie
Um, use a real compiler?
Yeah. Thanks for your help.
-
Nov 22nd, 2002, 02:39 PM
#36
Monday Morning Lunatic
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
-
Nov 22nd, 2002, 02:51 PM
#37
Thread Starter
Stuck in the 80s
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!
-
Nov 22nd, 2002, 03:28 PM
#38
Monday Morning Lunatic
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|