Code::Blocks Forums
User forums => Help => Topic started by: mihasic on December 21, 2021, 11:48:22 pm
-
I try a simple OpenCV code:
int main(int argc, char *argv[])
{
Mat img = imread("arnold_schwarzenegger.jpg");
if(img.empty())
return -1;
namedWindow("arnold_schwarzenegger", WINDOW_AUTOSIZE );
imshow("arnold_schwarzenegger", img);
waitKey(0);
return 0;
}
It compiles allright, but doesn't work.
On debugger, I receive a message:
In __cxa_throw () (/lib/x86_64-linux-gnu/libstdc++.so.6)
#5 0x00005555555553d4 in main (argc=1, argv=0x7fffffffe668) at /home/mikhail/CodeBlocksProjects/TryOpenCVALinux/main.cpp:15
/home/mikhail/CodeBlocksProjects/TryOpenCVALinux/main.cpp:15:372:beg:0x5555555553d4
15 namedWindow("arnold_schwarzenegger", WINDOW_AUTOSIZE );
Could anybody explain what it means or at least where I can look it up?
Thanks.
-
This is an OpenCV issue, not a C::B one. Look here (https://stackoverflow.com/questions/38802920/catching-opencv-exception-from-imshow-and-namedwindow) or here (https://answers.opencv.org/question/208343/namedwindow-opengl-exception-in-windows-10/) for more information.
-
Hi Miguel,
Thanks for your attempt to help.
Unfortunately, you didn't read my post up to the end.
The question was what the message meant or where I could look it up.
Sincerely,
mihasic.
-
I did read all your message even though it is completely OT here (because your error is a runtime one, hence not related to C::B).
Even being OT, I gave you two links so you can look up the issue. One is for Windows, because there is little information for Linux and you did not care to state your OS.
-
Regret to see you don't want to to understand my question. Once again, the issue is the message, and given that it is produced by codeblocks, it is definitely codeblocks issue. As for the OS and so on, I questioned nothing about it. Once again, thanks for your attempt to help, but I have to say this attempt becomes a bit too insistent.
-
https://forums.codeblocks.org/index.php/topic,9996.0.html (https://forums.codeblocks.org/index.php/topic,9996.0.html)
3. Is your problem library, framework specific? There are appropriate forums for it, not the Code::Blocks forum.
Try running the executable from the command line!
Does it work okay?
If yes, it might be a Code::Blocks related problem. If it does not then it is not likely an Code::Blocks IDE problem.
Tim S.
-
Hi stahta01,
thanks for your assistance.
Naturally, I tried it in command line (in monitor, as it is under linux mint) both in Release and Debug and it does not run ok.
I do not know who's problem it is and that is the thing that I try to understand.
Given that it is the message shown by CodeBlocks, I have to start with CodeBlocks.
I tried to search for "CodeBlocks debugger messages" but I gained nothing.
I don't really know where else to go.
-
Given that it is the message shown by CodeBlocks, I have to start with CodeBlocks.
Please make sure to IMPORTANT! READ THIS BEFORE ASKING FOR HELP! (https://forums.codeblocks.org/index.php/topic,9996.0.html), especially point 2.