riedl@cs.purdue.EDU (John T Riedl) (10/06/89)
I have a library of C routines that I want to use from C++. Of course, the function declarations in the header file are in C form without any argument specifications (e.g., int f();). Is there a trick to get G++ to accept these declarations? If not, is there a solution that doesn't require me to make a separate header file for G++ (with the '...' argument notation)? How do other people solve this problem? Thanks, John
schmidt@zola.ics.uci.edu (Doug Schmidt) (10/06/89)
In article <RIEDL.89Oct5161459@medusa.cs.purdue.EDU>, riedl@cs (John T Riedl) writes: >I have a library of C routines that I want to use from C++. Of >course, the function declarations in the header file are in C form >without any argument specifications (e.g., int f();). Is there a >trick to get G++ to accept these declarations? If not, is there a >solution that doesn't require me to make a separate header file for >G++ (with the '...' argument notation)? How do other people solve >this problem? Try using the -fno-strict-prototype option. Perhaps a better long-term solution is to get ahold of Ron Guilmette's `protoize' program and ANSIify your header files... You can contact Ron at rfg@ics.uci.edu. Doug -- schmidt@ics.uci.edu (ARPA) | Per me si va nella citta' dolente. office: (714) 856-4043 | Per me si va nell'eterno dolore. | Per me si va tra la perduta gente. | Lasciate ogni speranza o voi ch'entrate.