Click here to Skip to main content
15,881,589 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using Linux x86_64 machine to build my program. I have linked a shared library to an executable. In my project I am calling a function which has declared vector<string> inside the function. My program gets killed when that function gets called. When debugging through GDB below is the output I get.

Program received signal SIGILL, Illegal instruction.
0x00002aaaac4d2be7 in OC_Catalog_c::File_ToText (this=0x611aa0) at /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_vector.h:87
87              : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
(gdb) bt
0  0x00002aaaac4d2be7 in OC_Catalog_c::File_ToText (this=0x611aa0) at /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_vector.h:87


Is this issue of compilation of my shared library??

Adding more info: Function that i am calling File_ToText is a virtual function in class OC_Catalog_c. A member variable of other class has object of class OC_Catalog_c which also have virtual function File_ToText.Using that object I am calling File_ToText function of OC_Catlog_c from virtual function File_ToText. I will show a code snippet:

C#
class Oc_Catalog_c
{
    virtual vector&lt;string&gt;  File_ToText             (void) const;
}

class B
{
    const OC_Catalog_c*         m_pCatalog;
    virtual vector&lt;string&gt;  File_ToText             (void) const;
}

vector&lt;string&gt; B::File_ToText( void ) const
{
    vector&lt;string&gt; a_SubData;
    a_SubData = m_pCatalog-&gt;File_ToText();
}


-Chaks
Posted
Comments
The_Inventor 25-Aug-13 3:26am    
The file that you are converting to Text, is empty, so maybe there is a third option for error?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900