-1

Whenever trying to use SafeArrayLock/Unlock I keep getting the message "undefined reference to 'SafeArrayLock@4'.

I'm using Code::Block and just copy/pasting the default microsoft example for safearrays: https://support.microsoft.com/en-us/kb/207931

If i remove the safearraylock/unlock function lines then my dll compiles just fine. Put them back in and it tosses the undefined reference error.

efnfast
  • 47
  • 1
  • 4
  • 2
    duplicate http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix – paulm Jul 29 '16 at 09:04
  • Read this https://msdn.microsoft.com/en-us/library/windows/desktop/ms221492(v=vs.85).aspx scroll down to requirements add the library to your project – Richard Critten Jul 29 '16 at 09:18

1 Answers1

-1

Thank you for the MSDN; i read it several times over before I realized I was including the wrong library - ole32 instead of oleaut32. Ooops!

efnfast
  • 47
  • 1
  • 4