I’m banging my head here.. trying to resolve these LNK2001 errors. The help pages give me lots of reasons why, but I can’t see which one applies.
Please could a knowledgable VS 2005 C++ person assist with these? ask me questions.. that sometimes helps. If I wasn’t scared of looking like a mentalist I’d get a rubber duck to explain this to 🙂 but I sit in an office.
error LNK2001: unresolved external symbol “struct ethernetParams_t *
ethernetData_g” (?ethernetData_g@@3PAUethernetParams_t@@A)
simple_Console.obj
My code simple_console.cpp is trying to use a structure defined in C in but the way that the #includes work and the #stdafx is beyond me. The header containing ethernetParams_t is included in stdafx.h
#include "CON_ethernet_defs.h"
Please ask away… is the clue in the bit after the @@?
The linker is telling you that there is an unknown external symbol
ethernetData_gthat has typestruct ethernetParams_t *. The cause of this is that althoughethernetData_gis declared in the header you include, its definition comes from another object file that you need to link against. Since you are not linking with the approriate object file, the linker cannot find the proper definitionThe object file you are missing must come from the library you are attempting to use, so look in that folder for .obj files