0

Errors

core.obj : error LNK2001: unresolved external symbol _harmony_core_init
core.obj : error LNK2001: unresolved external symbol _harmony_core_final

core.c - piece of code that is function

harmony_core_init(); 

do_init(argc,argv); // Inicializa as funções do servidor  
.
.
do_sockets(next); 
} 
} 

harmony_core_final();

harmony.h - file with the code

#include "../common/harmserv.h" 

void harmony_core_init(); 
void harmony_core_final(); 

harmony.c - file with the code

#include "../common/harmony.h" 

void harmony_core_final() { 
db_destroy(mod_exports); 
db_destroy(harm_timer); 
harm_funcs->final(); 
} 

void harmony_core_init() {
int *module_version;
void (*module_init)();
}

appreciate the help.

1 Answers1

0

Since you didn't post more relevant information, unresolved externals means either one or more of the following:

  1. You failed to compile the missing functions.

  2. You failed to add the source modules that contains the implementation of the function to your project.

  3. You failed to add the static library that contains the object code that contains these functions.

  4. You failed to add the import library to to your project that contains stubs to these functions

  5. You compiled the module as a C++ module when it really is a C module, and other external modules are expecting a 'C' function, not a C++ function (name-mangling issue).

  6. Object code file or static library that contains object code is corrupted.

I think that's most, if not all the reasons.

So which one of the above would you say it is?

PaulMcKenzie
  • 34,698
  • 4
  • 24
  • 45