CompuServe Messages

C subroutines?

    04-Aug-94 20:22:11
Sb: #42075-C subroutines?
Fm: Jeff Pratt 76057,3645
To: Peter Greci 76104,2110
Yes, Anders Bjerin was the name I couldn't remember. Now, if I understand your other question correctly, you have a situation where you've got a c module that you want to call from another module — maybe a main, or whatever — and the module that you want to call has some #include <some_garbage.h> lines in it. Briefly, that shouldn't be a problem, as long as you have the needed include files on your system in an appropriate place such that your c compiler (actually the preprocessor, but that's another discussion) can find them. In certain circumstances, you'd also have to #include some of the files in your main code. An example of such might be when one of the include files typedefs or #defines something that is used as a parameter to the function(s) you want to call. The other thing that might get'cha is if the code you're trying to call has a main. That can usually be dealt with, too, by changeing it's name and possibly parameters…. but again that's probably a topic for a separate conversation. Good Luck, (AutoPilot'ed from) JcP