I was using Code::Blocks to try out parallel programming using OpenMP. MinGW compiler included in original Code::Blocks folder didn't support OpenMP, so I downloaded newer version (7.0.0) from Sourceforge and set up the project accordingly (-fopen parameter, path to libgomp-1.dll) and everything seemed to work as expected. Program is compiled and runs without problems when launched in Code::blocks. But when I tried to launch the .exe file from command line, I end up with Blue screen of death. The same thing happens with any code, even "hello world". Original MinGW given with Code::Blocks doesn't have this problem. I also tried another version (8.1.0) with the same result. It seems the crash happens even before any command from main function is performed. Using Win 7 64bit.
Related
I'm using Qt 5.8, with clion as IDE, made with bundled cmake 3.7.2. Using Mingw-w64, x86_64-6.3.0-posix-seh-rt_v5-rev0, which came bundled with GDB 7.11.1. Using Qt5.8 version from msys2 supposedly compiled with the same version of mingw-64 (couldn't get QT to compile on my system, so that was my only option). This problem seems agnostic to what I'm doing specifically, I'll often have code that works perfectly, no crashes, segfaults or whatever, and when i do the same things in the debugger it hangs for 30 seconds trying to open the QFileDialog, slowly loading the gui as if its going to work, before quickly crashing saying "Gdborig.exe has stopped working".
Not sure what other context I can provide, as again, only appears after doing the following calls:
QString fileName = QFileDialog::getSaveFileName(m_parent, QObject::tr("Save File"), QString(), QObject::tr("*");
but it doesn't matter what static method I use, same thing happens on getOpenFileName, and getOpenFileNames. There doesn't seem to be any pattern strictly speaking to the crashing, there are times I can get past it, and there are times I couldn't. I originally had a hypothesis that because I was using -pg -Og flags when the issue first appeared that these caused the issue, but I have since removed both of these flags and the issue persists.
I have seen similar behaviour in otherwise perfect applications and I was able to work around this by adding QFileDialog::DontUseNativeDialog as final parameter to the QFileDialog calls.
So I think, this is a COM-apartement issue of the native Windows libraries. But I have to admit, this is a very wild guess.
I just wrote a simple program that edits a file in C++.
After freshly installing Eclipse and MinGW following the guides on the net, everything seemed to be working fine. The program compiles and runs perfectly within the eclipse command window hook.
Screenshot of the program running fine in Eclipse
When I try to start the program out of my cmd window or just out of the explorer, I get an error message about the procedure entry point not being found.
Screenshot of the error message (in German)
This says something like:
"The Procedure Entry Point (...) was not found in the dll (...) PdftexFixer.exe."
I tried different compile options, all work fine within eclipse but the problem persists.
The program does not utilize any custom dlls. I tried cleaning the project foulder and compiling again from scratch. MinGW paths are set in the systems environment variables.
Any ideas whats wrong?
I have been compiling and running programs in C++ on Code::Blocks longly but today one of my programs compiled successfully but when I ran the program it returned -12 with time -0.00s. Whenever I write a new program in C++ the program compiles but it doesn't run. Also when I open the executable file created by Code::Blocks in the same directory Windows takes permission from me to allow the executable file to make changes to the computer. I've been trying through the day but I couldn't figure out what could be going wrong.
Also when I tried uninstalling Code::Blocks it didn't uninstall completely and when I opened the Code::Blocks folder in Program Files and tried deleting the folder the folder MinGW couldn't be deleted because Access was denied.
Please help if you could comprehend the problem and have knowledge regarding the issue.
I downloaded an open source c++ project which is written linux. I wanted to run in on windows and installed MinGW in order to compile and run it. I have successfully compiled it with "make" command and program runs pretty fast. Later, I moved program to Visual Studio, modified few lines including deleting "sys/time.h" library etc.. but never made a big change in algorithm itself. When I run the code, it runs but much slower than it runs with its compiled version in MinGW.
I haven't change anything in the algoritm. What should be the reason and how can I make it faster again?
Project I mentioned is here: http://perso.esiee.fr/~coupriec/temporal_segm.zip
It basically segments a given image sequence and produces segments with colored randomly.
I developed a small c++ program in Visual Studio 2012 on Windows7, 64bit (let's call it PC1). On that pc it runs fine!
Since I didn't have a versioning control system like SVN at hand, I copied ALL the project data (the exact folder structure, DLLs, source files, project files...) to a usb stick and moved it to another computer.
On that other engine there's Visual Studio 2010 on Windows7, 64bit (PC2).
So I just changed the platform toolset to v100 as described here.
I successfully compiled the project on PC2 (clean, build) and wanted to run the exe, but the command prompt stayed empty.
I then tried to debug and added a breakpoint at the very first line of main - which wasn't reached, the command prompt was still empty.
Ok, a usb stick is certainly not the most secure solution for data storage, so I gave it another try and moved it again - the problem remains.
Visual Studio's output on PC2 is the same as on PC1, so I couldn't find any anomalies there.
Yeah, there might be many error sources, so where can I start?
And how can I get a more verbose output for troubleshooting?
Or is this even a common phenomenon (perhaps due to different VS versions) and there's an simple way fix it?
This is not a full solution, but at least I'm a tiny step ahead:
In my last comment I wrote:
I took your advices into account and created a brand new project on PC2, VS2010. I exactly followed this guide: http://frozenhamster.wordpress.com/2011/02/11/lapack-on-windows-with-visual-studion-2010/
That didn't work either, so I removed I "out-commented" everything except for a single cout. Voila, that worked!
But as soon as I make use of the desired Armadillo (LAPACK and BLAS), the project compils but does not run.
What's going wrong here?
I don't get any compiler errors!