You are not logged in.

#1 2009-06-03 19:52:52

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

C++ old-style header questions

I recently inherited an old C++ project that I'm trying to compile using GCC 4.4. The project includes headers in the format <iostream.h> but g++ expects the newer <iostream>. Is there some way to get g++ to be happy with the older header inlcude format?


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#2 2009-06-03 20:03:10

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: C++ old-style header questions

If the definitions are the same in the old <iostream.h> and <iostream>, won't a good old sed work? I.e. switching out all occurences of <iostream.h> with <iostream> in the source files?

Offline

#3 2009-06-03 20:05:15

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: C++ old-style header questions

Yes, I could always do that, but I was hoping that there would be some option that would not require me touching the source.


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#4 2009-06-03 21:27:05

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: C++ old-style header questions

Could you fix it with the --std=something argument?

Offline

Board footer

Powered by FluxBB