PDA

Click to See Complete Forum and Search --> : Borland TC++ 4.5


Nov 29th, 2000, 03:48 PM
this is making me mad..
I have this code:


#include <C:\TCWIN45\INCLUDE\myinclude.h>
int main()
{
cout << "hello";
return 0;
}


it works fine in DevC++(which is why I added the whole path)

but the exact same code won't work in borland, it says it can't open the include file, and cout is undefined.... error #2 will be fixed if borland could use the file....
is there any option I can change to make this work??


BTW, the contents of myinclude.h is just some common includes I use, so far this is all it has.

#include <iostream.h>

parksie
Nov 30th, 2000, 12:31 PM
Just use #include <myinclude.h>

You should never use absolute path names - just add the folder with the headers in to your includes path. BTW - use forward slashes.

Benjamin
Nov 30th, 2000, 01:52 PM
thanks parksie,
but I tried that.. the only reason I used the absolute path is because I tried it in Dev C++, and it worked perfect, I tried the exact same code with and without the full path, in borland and it didn't work at all.. :(

BTW, I would use MS or Dev C++ to compile my programs, but borlands EZWin (the white DOS-Like console thing) is much better looking than DOS...

parksie
Nov 30th, 2000, 03:58 PM
Before you compile, type:

SET INCLUDE=%INCLUDE%;C:\TCWIN45\INCLUDE

Then use <myinclude.h> and see what happens (I can't remember the specifics for BC++ since I hate it)

Dec 1st, 2000, 01:23 PM
why do you hate it?

parksie
Dec 1st, 2000, 01:38 PM
Because:
a) The interface is clunky
b) The editor window is weird
c) It makes big EXEs
d) Project management is utterly screwed

Dec 1st, 2000, 05:27 PM
Can anybody help me?

pleeeeease, they have the exact same compiler at school and it works fine..

Dec 16th, 2000, 11:08 AM
I figured out my problem....

TC++ 4.5 is a compiler made for windows 3.1, and it doesn't support long file names,
so I just made the filename shorter, and it worked..


Thanks anyway... :)