c++ - Link Error: Unresolved External Symbol when creating object from Referenced file -


Project A and Project B I am referencing Project B from Project A (Project B is a test project for project A) When I try to create an object in Project B from Project I, I get errors by adding the errors I am

Example Code:

  / / sample class H, include # in Project A & lt; String.h & gt; Class CSampleClass {Public: CSampleClass (std :: wstring arg1, int arg2); ~ CSampleClass (); } //Test.h, Project B Class CEEST {public: in CTIEST (empty); ~ CTest (zero); Bull Run (zero); } //Test.cpp, Project B # included in "SampleClass.h" CTest :: CTest (zero) {} CTest :: ~ CTest (zero) {} bool CTest :: run (zero) {CSampleClass sample; & Lt; --------- This line error occurs} //B.cpp, #include in "Project" in "test.h" int main (int argc, wchar_t * argv []) {CTT test; test run(); }  

Errors given during build:

  error 3 error LNK1120: 2 unassigned external C: \ users \ Me \ project \ debug \ ProjectB.exe 1 1 ProjectB error 1 error LNK2019: Unsolved exotic symbol "Public: __thiscall CSampleClass :: CSampleClass (class std :: basic_string & lt; wchar_t, struct std :: char_traits & lt; wchar_t & Gt ;, class std :: communicator & lt; wchar_t & gt; & gt ;, integer) "(?? 0CSampleClass @@ QAE @ V $ basic_string @ _WU $ char_traits @ right now it is just standard @ STD @@V $ $ effector @ Now it's just standard @ 2 @@ STD @@ W4int) Referred to in Maroh ?? "Public: CTest :: Run (zero) __thiscall virtual bool" C (? @ CTest @@ UAE_NXZ Run): \ Users \ me \ ProjectB \ Test.obj ProjectB error 2 error LNK2019: Unsolved exotic symbol " Public: virtual __thiscall CSampleClass :: ~ CampleClass (zero) "(?? 1CSampleClass @@ United Arab Emirates @ XZ) function referred to in the" public: virtual bool __thiscall CTest :: run (zero) "(Run @ CTest @@ UAE_NXZ? ) C: \ Users \ me \ Project \ ProjectB \ Test.obj Project B  

Additional Information:

I'm Again Project Generating project A from A like:

Include project from project A to BI Has given project A's source directory to property b property pages for configuration properties & gt; C / C ++ & gt; Include additional directories

The directory structure of projects is:

  \ projects \ --Debug \ ---- ProjectAOutput. * // .obj; .pdb; .sbr; .exe; Etc. - Project B \ ---- Debug \ ------ ProjectBootstrap. * // Obj; .pdb; .sbr ;. Exe; Etcetera ---- projectbesource files * ---- Projectbizual studioprofix files. * - Processes file * // H ;. CPP; . --ProjectAVisualStudioProjectFiles *  

Question:

I feel like adding "source A to a source directory" Had been included in the section "Properties of Project B", I would also like to include a directory with the output of Project A to project the properties of B. I am unable to find it.

Do anyone know what to do to be able to use classes in another project?


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -