Message-ID: <333C3C43.7216@geocities.com> Date: Fri, 28 Mar 1997 22:46:43 +0100 From: Deltaman Reply-To: deltaman AT swipnet DOT se MIME-Version: 1.0 To: DJGPP ML Subject: Multiple-file problem Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! My program have gotten reasonably big, so I decided to split it. I now have 'header.h' which contains the prototypes for all functions, 'mainprog.c' which contains void main() and some often updated functions and 'somefunc.c' which has some fundamental functions. In 'somefunc.c' I include 'header.h' and 'mainprog.c' and in 'mainprog.c' I include 'header.h'. It compiles perfectly (in RHIDE) but when I links it I get the error messages: mainprog.c(a number) Error: multiple definition of somefunc.c(same number) Error: first defined here This happens with all functions (even main) in 'mainprog.c'. What should I do to make it work? ------------------------------------------------------------------------ mailto:deltaman AT swipnet DOT se Please visit my homepage at http://www.geocities.com/TimesSquare/8240 ------------------------------------------------------------------------ ______ _______ _______ _______ _______ _______ __ _ | \ |______ | | |_____| | | | |_____| | \ | |_____/ |______ |_____ | | | | | | | | | \_|