program won't run without the Qt IDE

Hi -

I've written a couple of programs within the Qt Creator IDE. It's noteworthy that neither of them require any of the Qt classes or libraries; I'm using Creator strictly as an IDE.

I'm trying to get these programs to run "standalone" from a CLI. I know that a few DLLs must be co-resident with the programs to allow this to happen, and I've copied those DLLs into both program locations.

One runs from the CLI, the other doesn't. The one that doesn't run immediately returns the CLI prompt. (Both programs run within Creator.)

I've tried using Dependency Walker to show me what's missing, but I'm new to DW and can't get any meaningful (to me) information from it.

Any suggestions on how I might chase down whatever is missing from the non-running program? I'm pretty sure the problem is with a missing library, but I don't have enough Windows development experience to identify them.

Any suggestions for how to move forward with this? Thanks.
You're using Qt as IDE, but are you creating your own makefile or using qmake? that's very vital, because Qt may involve some libraries if you use qmake. You have to write your own makefile.

And I didn't really understand. What kind of dependency problems are you facing? what compiler are you using? and are you facing a missing DLL problem? What's the error you're getting and where are you getting it?
Last edited on
I'm using QMake. (When I said I was using Creator as my IDE, I meant for building and running the programs as well. I just meant that I wasn't using any of the QT GUI constructs in my program.)

I'm using the Mingw compiler. I don't know what dependency problems I'm having. The program that runs, does so with just two Mingw libraries copied to its directory. I've copied those two libraries to the other program's directory as well, but it won't work.

No error message, just a prompt back from the CLI.

Is there some kind of log file or error code in an ENV variable that I could look at?
MinGW requires you to copy some dll to your base directory. It's called: libgcc_s_dw2-1.dll, I copy it to the executable directory + the other dependencies and the program works. Windows should inform you about the missing DLLs. It says something like

"Cannot find blablabla.dll".

A piece of advice: MinGW IS A CRAPPY COMPILER!!! If you want better performance in your programs use Microsoft Visual C++ 2010 compiler. It's at least 250% faster. It's FREE!!!

And by the way, I still don't understand what kind of problem you're having. And what does CLI mean anyway?????? try to double-click your executable and tell me what happens!!!
I copied that .dll to my directory already (along with another one that DW said I needed).

CLI is command-line interface; I guess Windows developers would refer to that as "CMD:" or "terminal." When I try to run the program from a terminal, I just get a prompt back immediately. No error messages, nothing.

When I double-click the executable, I get the spinning wait wheel for a few seconds, but nothing happens.

If I can't fix this problem, I'll look into another compiler. Right now, though, I have to think the solution is minor, if only I can find it.
I suppose the problem is in your program. Try to run a Hello World program, and tell me whether the same happens.
I already tried the hello program; it works fine from the CLI.

My program runs when launched from Qt's IDE, so there's nothing innately wrong with it. In my opinion, Qt is somehow providing some libraries to it that aren't available when I try to run it from the CLI.

And again, I used Dependency Walker, and it just doesn't show anything missing. (At least not that I can see; I've just begun using it and may not fully understand it.) So, something weird is going on here.
TheDestroyer wrote:
A piece of advice: MinGW IS A CRAPPY COMPILER!!! If you want better performance in your programs use Microsoft Visual C++ 2010 compiler. It's at least 250% faster. It's FREE!!!

Where are you getting these numbers?
I'm a physicist, and I often do tough calculations that require very high efforts. Last time I wrote a program that does a very tough double-fitting procedure for finding a magnetic field dipole in a grid. A step with MinGW's -O3 took 5 seconds, and a step with Visual C++ 2010 took 2 seconds... you do the math :-)

This is only 1 example, I have dozens more (even with OpenGL). Try it yourself!!!
Last edited on
Topic archived. No new replies allowed.