0

It's another of those questions... but I can't understand for the life of me, what is wrong.

Function.h

void doStuff(unsigned char a, unsigned char b, unsigned char c);

Function.cpp

#include "Function.h"

void doStuff(unsigned char a, unsigned char b, unsigned char c)
{
    char array[3] = {a, b ,c};
}

Implement.cpp

    #include "Function.h"

    class OSKeyInjector_Win32 : public OSKeyInjector
    {
    public :
        OSKeyInjector_Win32() {
        }

        virtual ~OSKeyInjector_Win32() {
        }

        virtual bool injectKeyEvents( const std::vector<KeyEventDesc> & intputlist)
        {
          do
            {
              doStuff(144, 90, 100);
            }while(0);

          return true;

       }
   };

unresolved external symbol "void __cdecl doStuff(unsigned char,unsigned char,unsigned char)" (?doStuff@@YAXEEE@Z) referenced in function "public: virtual bool __thiscall OSKeyInjector_Win32::injectKeyEvents(class std::vector > const &)" (?injectKeyEvents@OSKeyInjector_Win32@@UAE_NABV?$vector@UKeyEventDesc@@V?$allocator@UKeyEventDesc@@@std@@@std@@@Z)

Cœur
  • 37,241
  • 25
  • 195
  • 267
Yan
  • 582
  • 2
  • 6
  • 22
  • 1
    Is `Function.cpp` actually linked to your final artifact (executable, shared library)? – πάντα ῥεῖ Mar 29 '15 at 13:10
  • I thought it would do it automatically since the folder is included in additional directories and auto-completion worked.. but it didn't. Adding manually through Solution Explorer fixed the issue. – Yan Mar 29 '15 at 13:25

0 Answers0