0

I am new to C++ I sometimes get this sort of error. However I am not able to find out whats the reason.

RoofSettings.obj : error LNK2028: unresolved token (0A0038C8) "extern "C" void __cdecl func(wchar_t const *,wchar_t const *)" (?func@@$$J0YAXPEB_W0@Z) referenced in function "private: static void __clrcall Architecture::Helper::Settings::SetOffset(double)" (?SetOffset@Settings@Helper@Architecture@$$FCMXN@Z)

This time I am getting this error when I try this code

pin_ptr<const wchar_t> val = PtrToStringChars(dValue.ToString());
WCharCP offsetValue = val;
func(wcXPath, offsetValue);

Also the function is mentioned in .fdf file as

nativeCode Public void func (
     WCharCP pPropertyXPath,
     WCharCP pPropertyValue );

I have read answers of some of related questions but could not find any appropriate answer. Any guidance will be highly appreciated

Gyapti Jain
  • 4,056
  • 20
  • 40
Maria
  • 123
  • 8
  • 2
    Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – YSC Apr 16 '18 at 09:15
  • 1
    Thank you @YSC. I have already mentioned that i have read some similar questions. but couldn't get much help – Maria Apr 16 '18 at 09:16
  • 1
    If the suggested duplicate does not answer your question, you should explain why in your question unless you want it to be closed. – YSC Apr 16 '18 at 09:17
  • The linker can't find the implementation of `func`. So where is it? – Stan Apr 16 '18 at 10:38

0 Answers0