PDA

View Full Version : Executable error : 0xc0000139 when merging std c++ code in qt application



infomath
17th June 2013, 20:32
Hi! I have a simple application in qt and I'm trying to link some code that I have to it. However, when I'm merging the files in the project, it compiles, but I get an error at startup. When I try to debug it, I get a pop up message telling me Executable error : During startup program exited with code 0xc0000139.

I searched in google and I found that it's probably a dll error. I've got to admit, I don't really know how libraries work so I'm a bit confused.

I trying to import the code functions by functions to see what's working and what is producing the error. A simple function like this :


void descendanceOf(std::vector< std::list<int> >& tree, int node){
std::list<int> descendance;
descendance.push_back(4);
}


produces an error, but I function like this :


bool isFatherOf(const std::vector < std::list < int > >& tree, int node1, int node2){
for(std::list<int>::const_iterator it = tree[node1].begin(); it != tree[node1].end(); it++){
if((*it) == node2){
return true;
}
}
return false;
}

works perfectly fine. I'm confused. At first I though it has something to do with the std library, but both functions use it.

Thank you for your help!

alainstgt
18th June 2013, 01:12
Error code 0xc0000139 is issued when windows is failing to load a dll file.
The necessary dll files need to run your programm should be accessible by the OS.
Put them either in the windows/system32 or in the folder where your exe is stored.
If you do not know which dll, use dependency walker from Microsoft.
Alain

infomath
18th June 2013, 16:08
Thank you! I downloaded Dependancy Walker and I realized that libstdc++-6.dll was missing. I got other problems after...I decided to uninstall qt and delete minGW and other sources of possible conflicts and start all over again.