Qt Executable error : 0xc0000139 trying to merge c++ in qt application

若如初见. 提交于 2019-12-11 04:34:57

问题


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.


回答1:


You should download a copy of dependency walker to figure out if the application can find most* of its required DLLs (that aren't loaded via dlopen). http://msdn.microsoft.com/en-us/library/ms235265.aspx

For windows the paths to all/most DLLs are typically in the environment variable %PATH%.

You can launch a cmd prompt and type "set" to view all environment variables.



来源:https://stackoverflow.com/questions/17156268/qt-executable-error-0xc0000139-trying-to-merge-c-in-qt-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!