LNK2001 error
-
called from here: #include "file1.h" func.cpp { AF_TXT_FILE = OPEN_AIRFIELD_TXT_FILE(FILENAME); } file1.ccp FILE * OPEN_AIRFIELD_TXT_FILE(char *FILENAME) { //function here } file1.h FILE * OPEN_AIRFIELD_TXT_FILE(char *FILENAME); Here is the ERROR: error LNK2001: unresolved external symbol "struct _iobuf * __cdecl OPEN_AIRFIELD_TXT_FILE(char *)" (?OPEN_AIRFIELD_TXT_FILE@@YAPAU_iobuf@@PAD@Z) I hope this make sense as I've took out a lot of code and makde up short names and such.
-
called from here: #include "file1.h" func.cpp { AF_TXT_FILE = OPEN_AIRFIELD_TXT_FILE(FILENAME); } file1.ccp FILE * OPEN_AIRFIELD_TXT_FILE(char *FILENAME) { //function here } file1.h FILE * OPEN_AIRFIELD_TXT_FILE(char *FILENAME); Here is the ERROR: error LNK2001: unresolved external symbol "struct _iobuf * __cdecl OPEN_AIRFIELD_TXT_FILE(char *)" (?OPEN_AIRFIELD_TXT_FILE@@YAPAU_iobuf@@PAD@Z) I hope this make sense as I've took out a lot of code and makde up short names and such.
Just guessing, but is file1.cpp part of the project and if not, does it compile with no errors in whatever project it is in? If it is in a separate project, do you link with the .lib or .o file produced in that project? Chris Meech It's much easier to get rich telling people what they want to hear. Chistopher Duncan But for a man, barbecuing eggplant and portobello mushrooms is a sure way to have people question your sexual orientation. Kuro5hin