c++ - Segmentation fault when instantiating object from particular library -


I have a C ++ app (heavily shortened, shown below);

  #include & lt; Iostream & gt; #include "MyClass.h" void foobar () {MyClass a; } Int main (Int arc, four ** argv) {std :: cout & lt; & Lt; "Hello World! \ N"; Return 0; }  

Where "MyClass" is defined in a library linked to a static link (.a).

However, this application started immediately Segfaults, and I never get to "Hello world"

I can make an example of an interface from the same library, But I can not make an example of a class implementing the interface. I.e;

  zero float () {IMyClass a; // This application works in Miklas B; // Segfault if it's inside.}  

As you can see from above, there is no need to call the code even for application for segf.

I am using Netbeans 6.7.1 and GCC 4.3.2.

Now, I think there is something wrong with linking the library but I can not tell that I am linking to other libraries (all statically linked), the above class is linked to the first linked library (At least in the list first). If I make an example of a class from the second listed library, then everything is fine.

It is possible that the problem is similar to my other problem (or related):

Is there any suggestion about any problems what may be happening?

In the MyClass library that goes wrong, if you have the source code If not, it will be difficult to find and fix it.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -