Program structure (#include)

This is a discussion on Program structure (#include) within the C++ Programming forums, part of the General Programming Boards category; Hello.
I was having a problem with a project of mine. I am new to makefiles and I haven't used ...

main.cpp will be compiled (main.o will contain the definitions from def.h)
net_funcs.cpp will be compiled(net_funcs.o will contain the definitions from def.h)
Thus, both files contain the definitions.
when the compiler tries to link them together ( g++ main.o net_funcs.o -Lc:/cpp/include -lws2_32 ) - a clash will occur(double definitions).

So, do you have any ideas of how I should structure my program to make a nice #include system. Is there an universal good style to avoid clashes?