Problem compiling with multiple files?




I'm reletively new to Gtk and I'm writing an app in which I want to
split up different functions into seperate files. However, whenever I
move a function out of the main file where int main(int argc, char
*argv[]) is defined I get a ld.exe error? I guess the linker is
complaining about not being able to find these functions?

For example I have a function that puts a couple buttons in a box
(GtkWidget *Draw_Menu(void)) and returns the box to be displayed in the
main window.  However, whenever I move this function to its own files
(menu.c) I get errors. I put the function prototypes in a header and
included it in the main program so I don't see why the compiler
complains?  When I take all the gtk stuff out it works fine with no
errors?

Thanks



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]