'namespace does not exist' error RRS feed

  • Question

  • I'm getting an error trying to use my Windows 8 Class Library. 

    here's the actual error:

    Error 3 error C2871: 'RTLib' : a namespace with this name does not exist C:\Development\Main\PDF viewer\C++\MainPage.xaml.cpp 28 1 PdfShowcase.CPP (Windows 8.1)

    Here's what I did:

    • I've build a Windows 8.1 Class library in C# called RTLib.  I build a test Windows 8 app in C# and it works file.
    • I opened the PDFShowcase (C++) sample project
    • I added my RTLib project to the solution
    • I added a reference to the RTLib project via the Common Properties on PdfShowcase project
    • I added 'using namespace RTLib;' to the top of mainpage.xaml.cpp

    then I get the error above.

    Should I have used a Windows Runtime Library instead of a Class Library?  Is that the problem?

    Thank you.


    Thursday, November 14, 2013 2:48 AM