I have 3 projects: server, client and community. Creating header and source folders in Commons does not cause any problems, and I can freely access functions from the server and client.
However, for some reason, creating additional source / header files in a Server or Client project always causes multiple definition of (...) and first defined here errors.
Example:
commands.h (in the root directory of the Client project)
#ifndef COMMANDS_H_ #define COMMANDS_H_ #include "commands.c" void f123(); #endif
commands.c (in the root directory of the Client project)
void f123(){ }
main.c (in the root directory of the Client project)
#include "commands.h" int main(int argc, char** argv){ }
Errors:
make: *** [Client] Error 1 Client first defined here Client multiple definition of `f123' commands.c
Cleaning, index recovery, project restoration do not help. Does not restart the computer.
c eclipse include definition multiple-definition-error
matt-pielat
source share