![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| Rebooted Join Date: Apr 2002
Posts: 281
| [SOLVED] Using multiple source files: Multiple Declarations & Wrong line numbers [/EDIT] Wow, this is really weird. Somehow it thinks I am redefining a function where i am not, and even where a function isn't even being defined. Here are the errors: Code: g++ -pthread nemoserv.o nemoirc.o logger.o ircfunc.o sockfunc.o -o nemoserv nemoirc.o: In function `putServ(char *, int)': /home/ethereal/c++/nemoserv/nemoirc.h:83: multiple definition of `putServ(char *, int)' nemoserv.o:/home/ethereal/c++/nemoserv/logger.h:40: first defined here nemoirc.o: In function `putRawServ(char *, int)': /home/ethereal/c++/nemoserv/ircfunc.h:31: multiple definition of `putRawServ(char *, int)' nemoserv.o:/home/ethereal/c++/nemoserv/ircfunc.h:31: first defined here ircfunc.o: In function `putServ(char *, int)': /home/ethereal/c++/nemoserv/ircfunc.cpp:19: multiple definition of `putServ(char *, int)' nemoserv.o:/home/ethereal/c++/nemoserv/logger.h:40: first defined here ircfunc.o: In function `putRawServ(char *, int)': /home/ethereal/c++/nemoserv/ircfunc.cpp:32: multiple definition of `putRawServ(char *, int)' nemoserv.o:/home/ethereal/c++/nemoserv/ircfunc.h:31: first defined here collect2: ld returned 1 exit status make: *** [nemoserv] Error 1 The attached file is only .zip for upload reasons, it is not actually a .zip file. It is a .tar.gz or a .tgz file. [/NOTE]
__________________ Compilers: GCC on Red Hat 8.1 (Primary) GCC on Mac OS X 10.2.4 (Secondary) Others: MinGW on XP Last edited by Inquirer; 04-30-2003 at 04:43 PM. |
| Inquirer is offline | |
| | #2 |
| Rebooted Join Date: Apr 2002
Posts: 281
| Oh. I'd been experimenting with moving every single declaration from the .h and leaving only the prototypes, so i probably ended up fixing both problems without realizing it. Thanks for the tip. ~EtherealFlaim
__________________ Compilers: GCC on Red Hat 8.1 (Primary) GCC on Mac OS X 10.2.4 (Secondary) Others: MinGW on XP |
| Inquirer is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Logical errors with seach function | Taka | C Programming | 4 | 09-18-2006 05:20 AM |
| Request for comments | Prelude | A Brief History of Cprogramming.com | 15 | 01-02-2004 10:33 AM |
| Major glitch losing source files with MSVC++ and WinXP | JasonD | C++ Programming | 10 | 08-14-2003 12:15 PM |
| using a class in multiple source files??? | Crossbow | C++ Programming | 9 | 06-18-2002 07:42 PM |
| Line Numbers in VI and/or Visual C++ :: C++ | kuphryn | C++ Programming | 2 | 02-10-2002 10:54 PM |