How to change output filename
-
When I compile my project, I get an executable but I would like to change the filename.
I don’t want to use my File Manager that comes with my OS to change the filename. If I were to use that method, every time I compile, I would have to rename the executable.I looked at the GUI, I could only find the place to change the output folder.
It looks like when we compile, in a Release folder, it creates a file named Makefile.
If I change things in this Makefile and I compile the project, it looks like Makefile gets overwritten by some default values.In my project folder, I have
glhlib.pro
glhlib.pro.userDo I have to manually change something in these files?
Thanks!
-
When I compile my project, I get an executable but I would like to change the filename.
I don’t want to use my File Manager that comes with my OS to change the filename. If I were to use that method, every time I compile, I would have to rename the executable.I looked at the GUI, I could only find the place to change the output folder.
It looks like when we compile, in a Release folder, it creates a file named Makefile.
If I change things in this Makefile and I compile the project, it looks like Makefile gets overwritten by some default values.In my project folder, I have
glhlib.pro
glhlib.pro.userDo I have to manually change something in these files?
Thanks!
@stretchthebits said in How to change output filename:
Do I have to manually change something in these files?
Yes. TARGET in
glhlib.pro
-
@stretchthebits said in How to change output filename:
Do I have to manually change something in these files?
Yes. TARGET in
glhlib.pro
@ChrisW67 I added the line
TARGET = glhlib2.2.so
somewhere at the top of the glhlib.pro fileI did a clean build and it creates the file
libglhlib2.2.so.so.1.0.0How can I tell it to not add a .so and not add its own version number.
-
@ChrisW67 I added the line
TARGET = glhlib2.2.so
somewhere at the top of the glhlib.pro fileI did a clean build and it creates the file
libglhlib2.2.so.so.1.0.0How can I tell it to not add a .so and not add its own version number.
@stretchthebits You can take a look into the documentation: https://doc.qt.io/qt-6/qmake-variable-reference.html#version
-
@stretchthebits You can take a look into the documentation: https://doc.qt.io/qt-6/qmake-variable-reference.html#version
@Christian-Ehrlicher If I put
win32:VERSION = 1.2.3.4 # major.minor.patch.build
else:VERSION = 1.2.3 # major.minor.patchlike the document says, then it adds 1.2.3 to the filename and I get
libglhlib2.2.so.1.2.3If I put
win32:VERSION = # major.minor.patch.build
else:VERSION = # major.minor.patchit still adds a version number to the filename
libglhlib2.2.so.1.0.0 -
And that's the correct linux naming schema- don't see what's wrong here. You don't specify a version so its 1.0.0 by default.
-
@Christian-Ehrlicher If I put
win32:VERSION = 1.2.3.4 # major.minor.patch.build
else:VERSION = 1.2.3 # major.minor.patchlike the document says, then it adds 1.2.3 to the filename and I get
libglhlib2.2.so.1.2.3If I put
win32:VERSION = # major.minor.patch.build
else:VERSION = # major.minor.patchit still adds a version number to the filename
libglhlib2.2.so.1.0.0@stretchthebits
I don't know if you can somehow force the VERSION to be empty on the end of the library target.It's following the Linux convention for naming libraries. It's more usual to have
libglhlib2.2.so
as a symbolic link to a specific library with version, perhaps you could adopt that. -
And that's the correct linux naming schema- don't see what's wrong here. You don't specify a version so its 1.0.0 by default.
@Christian-Ehrlicher I see. I am a Linux noob so I don't know some of these Linux design standards.
So, I'll let it be libglhlib.so.2.2 -