PDA

View Full Version : Problems with executing the *.exe file



iksarp
26th February 2010, 22:05
Each valid code compiles and then runs smoothly in last version of Qt Creator, but when I start the *. exe file, an error and message appears, that dll files(eg. minwgwm10.dll, libgcc_s_dw2-1.dll) were not found. I head something about static linking, but I do not know how to configure it.

Thanks in advance!

schnitzel
26th February 2010, 22:50
Each valid code compiles and then runs smoothly in last version of Qt Creator, but when I start the *. exe file, an error and message appears, that dll files(eg. minwgwm10.dll, libgcc_s_dw2-1.dll) were not found. I head something about static linking, but I do not know how to configure it.

Thanks in advance!

try running from qt prompt.
Your app can't find the required libs if you run from a regular prompt or if you double click the exe.
Also you might want to study the following:
http://doc.qt.nokia.com/4.6/deployment-windows.html

iksarp
26th February 2010, 23:27
thank you for your your help!

my first problem: the "configure -static" is not working for me. it says:

Unable to detect the platform from environment. Use -platform command lineargument or set the QMAKESPACE environment variable and run configure again.

What should i do now? Where do i find QMAKESPACE and how to set it?

schnitzel
26th February 2010, 23:35
Did you run the configure from the Qt Prompt?

Is there a particular reason that you need to build statically?

The link I provided explains how to reconfigure but I would advise against it as it takes a long time.

john_god
26th February 2010, 23:47
Each valid code compiles and then runs smoothly in last version of Qt Creator, but when I start the *. exe file
I presume you're running from explorer, if this is the case probalbly you have to add qt dir to your system path. If you try to configure it statically please notice that there are some license issues if you dont have a commercial license. About statically configure, the forum wiki explains it very well.

iksarp
27th February 2010, 17:26
Thank you everyone for your help, i managed to configure it with your tips.

space_otter
28th February 2010, 04:50
My program terminates instantly when I try to run it from eclipse, and it produces the same error when I run it normally.
How do you "run with qt prompt"? What qt prompt??

schnitzel
28th February 2010, 04:53
It can be found in the Qt folder on the windows Start menu, right next to the shortcut for Qt Creator

space_otter
28th February 2010, 05:04
Thanks, I found the prompt. But running it from there is causing the program to crash instead. The missing library is in qt/bin but adding this to PATH did not help.

schnitzel
28th February 2010, 05:07
Thanks, I found the prompt. But running it from there is causing the program to crash instead. The missing library is in qt/bin but adding this to PATH did not help.

so it works from qt creator, but not from the qt prompt... hmmm
try copying QtCore, QtGUI, mingw and that other dll into the folder where your executable is and run the program again

space_otter
28th February 2010, 05:25
No, it doesn't work with qt creator. It crashes with "exited with code -1073741819"

I tried both debug & release.

schnitzel
28th February 2010, 05:35
No, it doesn't work with qt creator. It crashes with "exited with code -1073741819"

my bad, I was thinking you were the thread's author.
what's your program?

space_otter
28th February 2010, 05:42
It has 24 files so far. It was working before (and it was cool too!) but something made it unhappy, and I can't put my finger on it. I'm guessing a change to the source code may have caused the error, In which case I'm in a real fix. I'll keep trying.

Ha! I tried using the Qt Creator debugger and I'm getting some meaningful results. If I fix this I'll post again.

schnitzel
28th February 2010, 05:45
totally different issue then and probably it is better if you open a new thread

space_otter
28th February 2010, 05:49
this->setObjectName(name);
this->mStack = new Stack(ui->decimalPlacesBox->value(), ui->accuracyBox->value());

connect(ui->accuracyBox, SIGNAL(valueChanged(int)), mStack, SLOT(setAccuracy(int)));

ui->setupUi(this); // should come first, was causing segmentation fault.
ui->stackView->setModel(mStack);



QModelIndex Stack::parent ( const QModelIndex & index ) const {
return index.parent();
}

The previous caused an infinite loop. I blame this on the lack of clear documentation on QAbstractItemModel.