Click to See Complete Forum and Search --> : help compiling C in C++
bobbybobbertson
09-30-2002, 06:26 PM
I am trying to compile a program written in C in a C++ compiler. It compiles fine, but when I run the program there is no output?
I am hoping this is a common problem when trying to convert, and someone might have a quick fix?
Supposedly you are supposed to be able to compile C programs in a C++ compiler.
Anyone know why this might be happening?
nuvan
10-01-2002, 08:29 PM
this is something i've seen too...
please someone post a response.
about the only thing I can think of doing is redirecting the output to a file
# ./foo > foo.txt
maybe that will help??
btw, i'm on a WinNT machine @ work right now, so I can't test the solution...
tecknophreak
10-01-2002, 10:11 PM
is it a big program? can you post the code here?
is the code possibly compiler(system) specific?
bobbybobbertson
10-02-2002, 10:52 AM
actually it is not my code. I have a friend who works for a R&D facility, and they finally updated their system from 16 bit processing to 32 bit. (Honestly I didn't get enough info as to whether it was from dos to windows, or to linux or what). So now when they try to compile their old C code in the new C++ compiler, they are struggling. (don't know why they aren't just using a C compiler)
Anyway, I just wanted to see if there were any common problems with compiling C code in a C++ compiler, and what people's first reactions to try would be.
thanks for all the feedback. if i get any more details, i will post them