using STL bitset error - VxWorks

This is a discussion on using STL bitset error - VxWorks ; I've written the following code to use STL bitset #include #include VOID usrTestSTL(void) { #ifdef USER_APPL_INIT USER_APPL_INIT; /* for backwards compatibility */ #endif bitset bTest; bTest.set(0); unsigned long lCount = bTest.count(); cout } after compile the program and download the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: using STL bitset error

  1. using STL bitset error

    I've written the following code to use STL bitset
    #include
    #include

    VOID usrTestSTL(void)
    {
    #ifdef USER_APPL_INIT
    USER_APPL_INIT; /* for backwards compatibility */
    #endif

    bitset<5> bTest;
    bTest.set(0);
    unsigned long lCount = bTest.count();
    cout << "count" << bTest.count()<< endl;
    }
    after compile the program and download the object file to target,there
    are an error message:
    unresolve symbol __t10_Bit_count1b1$_S_bit_count

    How to solve this problem?Is it a bug of VxWorks 5.5?I have included
    all STL components in vxWorks image.


  2. Re: using STL bitset error

    Very strange that set() is resolved, but not count().

    I compiled it with no probs. Try to correctly resolve the std namespace
    to make sure the compiler is using the symbol that you want.

    #include
    #include

    void usrTestSTL(void)
    {
    std::bitset<5> bTest;
    bTest.set(0);
    std::cout << "count " << bTest.count() << std::endl;
    }


+ Reply to Thread