Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Problems getting QT to work as Netbeans QTApplication on Windows 10



  • Hello everyone,
    tried last weekend to work with QT on my Windows 10 64bit VM on VMWare.
    After installed QT and MinGW (QT Creator works absolutely perfect) i tried to write an test QT Application on Netbeans.
    I Created a QTApplication with only the auto generated main.cpp file and tried to run it.
    Build was successful but when my IDE tried to run i got console message (RUN FAILED exit code 103) ... Thats all

    In the debugger it also show the following: 0xc000007b exit Program. Finally i figured out that make was successful, the *.exe was also created but cant be executed.

    I cant understand it, because Genereated executables within qt creator are working perfect

    I previously did this on my Linux Mint VM several times and never got this error

    Thank for help


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Qt Creator tweaks for you the PATH environment variable so that when you start your application it can find the .dlls from the Qt version you are using. You will have to replicated that within netbeans.



  • Oh thank you. I'll try it. But i have another question...
    I tried to run qt in VS 2019 with qt tools. Do i have to enable the windeploy tool the test my applications. And is there anything to do befor everything works fine? Everytime i try to run a QTApplication from within VS i get a similar error because the exe file cannot be executed. Seems to be an similar problem like my netbeans problem



  • @SGaist said in Problems getting QT to work as Netbeans QTApplication on Windows 10:

    Hi and welcome to devnet,

    Qt Creator tweaks for you the PATH environment variable so that when you start your application it can find the .dlls from the Qt version you are using. You will have to replicated that within netbeans.

    Why i dont have to this on Linux. Development on Linux is so much easier and more comfortable...
    I just build qt from source on linux, installed netbeans and everything works...


  • Lifetime Qt Champion

    @d-rein said in Problems getting QT to work as Netbeans QTApplication on Windows 10:

    Oh thank you. I'll try it. But i have another question...
    I tried to run qt in VS 2019 with qt tools. Do i have to enable the windeploy tool the test my applications. And is there anything to do befor everything works fine? Everytime i try to run a QTApplication from within VS i get a similar error because the exe file cannot be executed. Seems to be an similar problem like my netbeans problem

    That should not happen with the Qt plugin for Visual Studio installed. Do you have that issue with a pure Qt application ?

    @d-rein said in Problems getting QT to work as Netbeans QTApplication on Windows 10:

    @SGaist said in Problems getting QT to work as Netbeans QTApplication on Windows 10:

    Hi and welcome to devnet,

    Qt Creator tweaks for you the PATH environment variable so that when you start your application it can find the .dlls from the Qt version you are using. You will have to replicated that within netbeans.

    Why i dont have to this on Linux. Development on Linux is so much easier and more comfortable...
    I just build qt from source on linux, installed netbeans and everything works...

    Not the same way of handling symbols and libraries.



  • When i start or test an QT Application with qt creator standalone i have no errors. When i hit the debugging button in VS i get the message "Entry point not found" - "the procedure entry point ?hideEvent@QWidget@@MEAAXPEAVQHideEvent@@@Z could not be located in the dynamic link library C:\Users<myname>\source\repos\ApplicationName\x64\Release\ApplicationName.exe"

    It seems to be an similar error like in netbeans.
    I have qt<version>\bin; msys\1.0\bin and mingw/bin in my PATH
    Is there anything else i need to add?

    Thanks


  • Lifetime Qt Champion

    Wait, there's something fishy, you mention both Visual Studio and MinGW. Which one are you using ?



  • @SGaist Currently i use msvc2017_64 in VS. Bin GW is also installed but i use mingw only with netbeans. Are there any env vars i need to set?
    Sry about so much questions but I cant understand whats going on with my VS or Netbeans


  • Lifetime Qt Champion

    Which plugin are you using with Visual Studio ? Did you start from a .pro file ?

    As for netbeans, you can take a look at the environment variables in the Run part of the Project panel in Qt Creator.



  • I am using Qt Visual Studio Tools v2.6.0.7
    I installed a new VS and QT(Online Installer) on a fresh Win 10 64bit VM
    QT Creator works fine, again.
    In VS i installed QT VS Tools and within VS QT Tools msvc2015 32 & 64 bit
    After restated VS i created a new Qt Widget Project.
    My execute error is gone away, yeahh !!! but 2 error left.

    alt text

    I Hope you can help me


  • Lifetime Qt Champion

    I would say that means that uic was not run to generate the code from your .ui files.



  • It works but i have to add the path to the ui_*.h file. Do i have to install uic manually?


  • Lifetime Qt Champion

    uic is in the same folder as qmake.

    You need an equivalent to a custom step that will run uic on your .ui files and generate the output in the build folder.



  • Finally i found my Solution :-)
    It's a bit strange, but to make the error messages disappear, I just have to change something (no matter what) in the project settings and then click Apply. After that everything works ...

    the uic, moc and rcc files are created in the own folders in the ../x64/debug folder.


  • Lifetime Qt Champion

    Great !

    These generated files should go in the build folder so everything is fine.

    Since you have it working now please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :-)



  • Thanks for your help


Log in to reply