my clion run default"CreateProcess error=216" - clion

Error running 'random': Cannot run program "C:\Users\31665\CLionProjects\random\cmake-build-debug\random.exe" (in directory "C:\Users\31665\CLionProjects\random\cmake-build-debug"): CreateProcess error=216, 该版本的 %1 与你运行的 Windows 版本不兼容。请查看计算机的系统信息,然后联系软件发布者。enter image description here

Related

Cannot launch MinGW-built program in WinDbg: "No runnable debuggees error in 'g'"

I'm trying to debug a program in WinDbg. However, WinDbg won't run it after I launch it; after loading the binary, when I attempt to continue the program I get this error:
0:002> g
^ No runnable debuggees error in 'g'
Some relevant facts:
I'm using Windows 10.
The program in question is written in C and was built with MinGW.
The program is loaded, as I see it in the Task Manager. It just won't go beyond ntdll!NtWaitForWorkViaWorkerFactory.
There is no error in the program at this point; I'm just trying to get the thing running before I move on to my real problem (which is beyond the scope of this post).
I can attach to a running instance of this program just fine, I just can't launch new ones.
I can launch notepad.exe with WinDbg just fine.

"%1 is not a valid win32 application" Rust Command run fail

I'm downloading an executable via curl and try to run it afterwards. However, the Command object responsible for running it crashes with the following message: %1 is not a valid Win32 application. (os error 193)
Here's a snippet for better context:
let link = "https://download.bell-sw.com/java/18.0.1.1+2/bellsoft-jre18.0.1.1+2-windows-amd64-full.msi";
Command::new("curl")
.args(["-O", link])
.output()
.unwrap_or_else(|err| panic!("{err}"));
let program = format!("./{}", link.split('/').last().unwrap());
Command::new(program)
.output()
.unwrap_or_else(|err| panic!("{err}"));
A .msi file is not an executable. To install it you need to run msiexec.exe /i "c:\path\to\installer.msi" /qn.
To open the file like Explorer you would have to call the ShellExecute WinApi...

NW.js icons (generally, and in Windows 10)

Has anyone succeeded in replacing default NW.js logos -- either with the "icon": "string with path to icon" in the manifest OR with Resource Hacker?
After producing standalone .exe files (with Enigma Virtualbox)which work fine, Resource Hacker seems to work, but the new .exe file produced will no longer run in Windows 10 -- yielding a "This program will not run on your PC..." error message.

Windows 7: unable to register DLL - Error Code:0X80004005

When I tried to register a COM DLL,
regsvr32 rpcrt4.dll
I get the following error message:
`The module "c:\windows\system 32\"rpcrt4.dll" was loaded but the call to DllRegisterServer failed with error code 0X80070006.
How do I fix this problem? Please help.
According to this: http://www.vistax64.com/vista-installation-setup/33219-regsvr32-error-0x80004005.html
Run it in a elevated command prompt.
Open the start menu and type cmd into the search box
Hold Ctrl + Shift and press Enter
This runs the Command Prompt in Administrator mode.
Now type regsvr32 MyComobject.dll
Use following command should work on windows 7. don't forget to enclose the dll name with full path in double quotations.
C:\Windows\SysWOW64>regsvr32 "c:\dll.name"

Custom debug command in Visual Studio using a Makefile project

I have a Makefile-powered project in Visual Studio 2010 (uses NAnt, in fact, but that's beside the point).
The output of the build process is a .elf file, and I have a separate, non-VStudio debugger which can be run on that .elf file to debug it.
Building works fine, but when I click the 'debug' button (little green triangle), VStudio fails with "Unable to start program 'XXX.elf'. The specified file is an unrecognized or unsupported binary format"
I'm guessing VStudio is just trying to 'run' the .elf as though it were an .exe, and failing.
What I really want VStudio to do is run "my_debugger.exe XXX.elf" when I press the debug button.
I have tried adding a file association with .elf=>my_debugger.exe
I have updated PATHEXT appropriately as well, and run VStudio under those changes.
Still no luck.
Isn't there somewhere in VStudio where you can specify a custom debug command? I thought there was, but can't find it.
I could just have the build process output a .bat file or something I guess, but this seems silly.
As Jim mentioned you can specify which app to start on run in the project settings (Command field). If you place a debugger there you can pass down your executable as an argument to the debugger being launched (Command Arguments field). This way you can launch the debugger which in turn will launch your executable if the debugger expects any commandline arguments.
MinGW on Windows example:
Command: gdb.exe; Command Arguments: Path\ToMyApp\whatever.exe
will start gdb.exe, gdb.exe will open whatever.exe, parse the debug info and wait for debug instructions.
Command: msys.exe; Command Arguments: gdb.exe Path\ToMyApp\whatever.exe
will start msys.exe, msys.exe will execute "gdb.exe Path\ToMyApp\whatever.exe"
Look at the project properties. Do you have a Debug tab which has a Start Action section giving three choices? Those choices would be: ( ) Start project, (x) Start external program: ... ( ) Start browser with URL.
You can also set the command line arguments and working directory.
Cf. How to: Change the Start Action for Application Debugging

Resources