Impossible Generate Executable whit its dependecy
-
@AntGP said in Impossible Generate Executable whit its dependecy:
and i build using thoose buttons on Qt creator
Sorry have to say, this answer is... something... creative :D
@AntGP Don't worry about the structure or the multiple
*.pro
files. It's common for larger projects with submodules, which need some extra build/install configuration...
Theinclude
includes other.pro
files, so you can share variables and functions/macros. That's why there is acommon.pro
which is included in (almost) every other pro (-ject).@AntGP said in Impossible Generate Executable whit its dependecy:
I'm working on a very strange project that has multiple .pro files that are built into multiples .exe
There is nothing strange about that. Having projects with more than one executable and multiple libraries is also standard.
What does this whole thing do? What kind of project is it?
What is your goal?! Just building it? Because I see you commented some of the submodules in the.pro
file, so they are not included?!@Pl45m4 said in Impossible Generate Executable whit its dependecy:
What does this whole thing do?
My goals are to have the executable able to work whiout all the source code, i don't want any .cpp allongside the exe so i can share the programme, and not have 1Go of source code with it
@Pl45m4 said in Impossible Generate Executable whit its dependecy:
There is nothing strange about that.
It's a 15 years old project whit no documentation, no comments on the code, lot of java script, and at least 4 differents dev befor me
It can be built, but not outside of the source code folder@jsulm said in Impossible Generate Executable whit its dependecy:
That's because QtCreator expects the build folder to be outside the source tree. Any reason why you want to have the build folder inside the tree folder?
That what i'm trying to do, i want to build it on my desktop and not on my source tree, but it build on the source tree even if i don't want and say otherwise, and if i try to move the .exe it say it miss some dll that are not even on the project or anywhere on my computer
(i think the name of the topic is not the best one whit some insight on the issues i have now)
-
@Pl45m4 said in Impossible Generate Executable whit its dependecy:
What does this whole thing do?
My goals are to have the executable able to work whiout all the source code, i don't want any .cpp allongside the exe so i can share the programme, and not have 1Go of source code with it
@Pl45m4 said in Impossible Generate Executable whit its dependecy:
There is nothing strange about that.
It's a 15 years old project whit no documentation, no comments on the code, lot of java script, and at least 4 differents dev befor me
It can be built, but not outside of the source code folder@jsulm said in Impossible Generate Executable whit its dependecy:
That's because QtCreator expects the build folder to be outside the source tree. Any reason why you want to have the build folder inside the tree folder?
That what i'm trying to do, i want to build it on my desktop and not on my source tree, but it build on the source tree even if i don't want and say otherwise, and if i try to move the .exe it say it miss some dll that are not even on the project or anywhere on my computer
(i think the name of the topic is not the best one whit some insight on the issues i have now)
@AntGP said in Impossible Generate Executable whit its dependecy:
It can be built, but not outside of the source code folder
So it builds in your IDE?
Then you are looking for Qt Deployment to run it standalone (as far as possible, you gonna need some DLLs to ship your app) as.exe
-
I'v tried to follow the tutorial, then to follow some youtube video ( https://www.youtube.com/watch?v=rFHPOZoqzcg) but it still doesn't work, it do the same and ask for some dll that are not existing at all
But it doesnt ask for them if im on the source tree -
Ok, so they should have used the
.pri
extension (it's mainly a convention but it clearly separates a project file from a inclusion file (and the.prf
which is for features).The main issue here is that the project forces everything to be "in-tree". It should not be PWD but OUT_PWD for anything that is related to build artifacts. However, you should just remove these lines (DESTDIR and OBJECTS_DIR).
As for starting the application, did you modify the PATH environment variable in the Run part of the Project panel so that the dependencies can be found ? (do not do it system wide).
-
Also, to add to @SGaist, that last error you got (0xc000007b) means that while you copied the correct names of the dlls, you copied the wrong version of them:
the 64-bit version of the dlls when the ,exe file is 32-bit or the other way around.@hskoglund That would be useful to know, does that error number always indicate a 32-/64-bit mismatch?
-
Yeah, pretty much always. (Much better compared to the other error 0xc000007c, which can occur due to multiple different reasons.)
@hskoglund I'll try to remember
7b
over7c
:) -
Ok, so they should have used the
.pri
extension (it's mainly a convention but it clearly separates a project file from a inclusion file (and the.prf
which is for features).The main issue here is that the project forces everything to be "in-tree". It should not be PWD but OUT_PWD for anything that is related to build artifacts. However, you should just remove these lines (DESTDIR and OBJECTS_DIR).
As for starting the application, did you modify the PATH environment variable in the Run part of the Project panel so that the dependencies can be found ? (do not do it system wide).
@SGaist said in Impossible Generate Executable whit its dependecy:
Ok, so they should have used the .pri extension (it's mainly a convention but it clearly separates a project file from a inclusion file (and the .prf which is for features).
Yes there is some .pri , even some java script , some .conf and xml files needed by the project to work
@hskoglund said in Impossible Generate Executable whit its dependecy:
Also, to add to @SGaist, that last error you got (0xc000007b) means that while you copied the correct names of the dlls, you copied the wrong version of them:
I already searched, everything on my computer is 64, and the dll i took was from mingw81_64, nothing from a 32 bits
What's very strange is that on the project tree, i can double click on the executable it don't work, but Qt creator manage to run it whiout issues
-
Hi,
While 18 is large, it's not completely extraordinary (just take the Qt5 sources for an example of large qmake based project).
However
.pro
files calling each other does not sound right. For "multi-projects" project, there is the subdirs template. I think you should check that as a starting point.i'v redo all the install, and the things, it appeared it was missing a dll it didnot asked for (libwinpthread-1.dll)
And after bumping my head against my keyboard doing weird things, i have now a standalone folder whit no source code. It can be moved where i want even on a virtual machine and it worked
How to solve my issue and a small summary of what i'v done
@jsulm said in Impossible Generate Executable whit its dependecy:
After calling qmake you need to start the actual build
@Pl45m4 said in Impossible Generate Executable whit its dependecy:
Then you are looking for Qt Deployment to run it standalone
@AntGP said in Impossible Generate Executable whit its dependecy:
I'v tried to follow the tutorial, then to follow some youtube video ( https://www.youtube.com/watch?v=rFHPOZoqzcg)
Some dll where missing
@AntGP said in Impossible Generate Executable whit its dependecy:
*it appear they where on mingw
there is an error
I'v redone everything from the start, no more error, just the application not launching, only making a small white square on the midle of the screenThen I bumped my head on my keyboard to copy past on the same tree shape (a bin folder whit all the other folder around on the same format as in the source tree) all the json, .conf, the images, the csv, xml and some library one by one until double clicking on the .exe do execute the application
AND NOW IT WORK \o/ yay
Thank you all for the help !
-