There is not an easy cross platform way I believe, but for Windows:
You need to mention the compiled executable in the registry (HKLM\...\Run or HKCU\...\Run) or locate the executable in %UserProfile%\AppData\...\Startup.
Using the WinAPI, you can do the first idea through a registry call, but I believe that you need the name the compiled exe will have after compilation. You'll also need it to create a shortcut in the Startup folder to do it the other way.