 Qmake handles linking a little bit differently. So far we've talked about pre-target depends post-target depends but now we're going to talk about before linking and after linking. After linking is usually what you're looking for if you want to do some sort of cleanup script. Let's go ahead and take a look. So I'm going to say console app and I'm going to do this end-to-end So you can see there's really no wizardry here. I'm not hiding anything from you So I'm going to say Q5 design patterns and this is 12, 3 And we're just going to leave everything the default Got no compile output because we've done absolutely nothing And we've got just a blank project file with nothing in it first things first We need to you guessed it add general empty file and Let's call this Pre-link.py No, I do not want to install any goodness. Thank you very much And I'm just going to paste some Python script in here It's going to say script run before linking and then we're going to import OS We're going to get an array from list or and then we're going to print that out and I'm gonna say script finished Very very simple and now I want to go add new general empty file Let's say post link Again, this is a Python file and I'm going to take the most complex Python program on the planet This is the same thing. It just says after linking. All right Really very bare bones basic Now we can go into our project here You may be thinking oh great now We've got to go through and do all this fancy stuff with target depends. Nope We don't need to do any of that so we can say Q make. They actually made this a little bit easier I'm going to say pre link And then we got to be a little bit careful because this is the same thing as a command line, so I'm gonna say Python 3 Whatever our directory is And we want the pre link dot py Now we can say Q make You guessed it post link and then we could pretty much just copy and paste this Let's go ahead and save our project file and you can see it parses it As long as you didn't hear the little red bars here. Everything's good So they made this drastically simpler for pre and post link now remember In case you skipped that day. We're all the way here in the build process So we've done our pre-processing. We've done our compilation and now we're getting ready to link the pre link And then we have linked or after everything's been created Spoiler alert Let me post some notes in here. I want to put this right up front Expect this to be slightly different based on the OS and the compiler These are not guarantees. They're a best effort. I Have personally never had any real major problems with them But if you're expecting like some specific timing don't even count on it There's no guarantees of any kind. So all right, let's open up our compile output again We're just doing the pre link and the post link running Python scripts. All right, so What we've got here, we have started through and it says script run before linking notice how we've got our main O and Then script run after linking and sure enough. There is our binary right there, which is missing from the array previously So you see in this example, it is working again by or be where you may run into specific issues Especially if you've got some weird timing issue on your hardware or your compiler has some sort of special thing that it's doing