Hello,
I have 3 files in my gtk+ app:
main.c:
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "mainwindow.h"
int main(int argc, char** argv)
{
MainWin* win;
GError* err = NULL;
int a = 0;
a = some_foo();
gtk_main();
return 0;
}
mainwindo.h
#include <gtk/gtk.h>
typedef struct _MainWin
{
GtkWindow parent;
} MainWin;
GtkWidget* main_win_new();
int some_foo();
MainWindow.c
#include "mainwindow.h"
int some_foo()
{
return 1;
}
When i try to call some_foo
in main function, and try to compile i see error: undefined reference to `some_foo'. What's wrong?
Thank you.