executable

Unexpected exit code for a C program compiled for 32 bit architecture using gcc

◇◆丶佛笑我妖孽 提交于 2020-01-14 11:28:57
问题 I wrote a simple C program and compiled it for 32 bit architecture. But when I ran it, I found unexpected results. #include <stdio.h> int foo(int n) { int sum=0; int i; if (n <= 1 || n >= 0x1000) return n; for (i=0; i<= n; i++) { sum = sum + i; } return foo(sum); } int main(int argc, char** argv) { int n; n = foo(200); printf("\n\n main about to return %d \n\n", n); return n; } ➜ wbench gcc -o test.elf test.c -m32 -fno-stack-protector -mpreferred-stack-boundary=2 -Wall ➜ wbench ./test.elf

Unexpected exit code for a C program compiled for 32 bit architecture using gcc

∥☆過路亽.° 提交于 2020-01-14 11:27:48
问题 I wrote a simple C program and compiled it for 32 bit architecture. But when I ran it, I found unexpected results. #include <stdio.h> int foo(int n) { int sum=0; int i; if (n <= 1 || n >= 0x1000) return n; for (i=0; i<= n; i++) { sum = sum + i; } return foo(sum); } int main(int argc, char** argv) { int n; n = foo(200); printf("\n\n main about to return %d \n\n", n); return n; } ➜ wbench gcc -o test.elf test.c -m32 -fno-stack-protector -mpreferred-stack-boundary=2 -Wall ➜ wbench ./test.elf

Why is my QT application not working?

梦想与她 提交于 2020-01-14 08:49:05
问题 I built a Qt 5 application using Qt Creator on Windows 7 64 bit (using msvc 2010). The application runs perfectly on my computer but it won't work on other computers. I copied all the .dlls which were shown as missing in Dependency Walker into the program folder and there is no error, but the application just won't run. I've tested it on Windows XP and Windows 7 64 and 32 bit. What can I do in order to find out what's wrong? UPDATE: i installed Qt 4.8.4 (vs 2008) and msvc 2008 express and i

Final managed exception handler in a mixed native/managed executable?

爱⌒轻易说出口 提交于 2020-01-14 08:41:28
问题 I have an MFC application compiled with /clr and I'm trying to implement a final handler for otherwise un-caught managed exceptions. For native exceptions, overriding CWinApp::ProcessWndProcException works. The two events suggested in Jeff's CodeProject article, Application.ThreadException and AppDomain.CurrentDomain.UnhandledException , are not raised. Can anyone suggest a way to provide a final managed exception handler for a mixed executable? Update: It appears that these exception

Pyinstaller - Calling GDAL from os.system (gdal_translate)

随声附和 提交于 2020-01-13 20:20:20
问题 Greetings learned fellows. Running 32bit Python2.7 on Windows 7. I'm have a question regarding including GDAL executables in a pyinstaller build. I am making a system call to run two GDAL functions from the FWTools release. These functions are in the PATH variable on windows C:\Program Files (x86)\FWTools2.4.7\bin and so it runs fine from the Python27 environment. However, this path is not carried over to the pyinstaller build. The code in question is calling a GDAL function to re-translate

Pyinstaller - Calling GDAL from os.system (gdal_translate)

折月煮酒 提交于 2020-01-13 20:18:48
问题 Greetings learned fellows. Running 32bit Python2.7 on Windows 7. I'm have a question regarding including GDAL executables in a pyinstaller build. I am making a system call to run two GDAL functions from the FWTools release. These functions are in the PATH variable on windows C:\Program Files (x86)\FWTools2.4.7\bin and so it runs fine from the Python27 environment. However, this path is not carried over to the pyinstaller build. The code in question is calling a GDAL function to re-translate

python multiple threaded processes for running executables

人走茶凉 提交于 2020-01-13 19:07:44
问题 I am trying to upgrade a python script that runs an executable on windows and manages the text output files to a version that uses multiple threaded processes so I can utilize more than one core. I have four separate versions of the executable which each thread knows to access. This part works fine. Where I run into problems is when they are running simultaneously and try to open the (different) output files to ensure they ran correctly and react depending on the contents of the output file.

Determine if an executable (or library) is 32 -or 64-bits (on Windows)

为君一笑 提交于 2020-01-13 08:28:07
问题 I am trying to find out if a given executable (or library) is compiled for 32-bits or 64-bits from Python. I am running Vista 64-bits and would like to determine if a certain application in a directory is compiled for 32-bits or 64-bits. Is there a simple way to do this using only the standard Python libraries (currently using 2.5.4)? 回答1: The Windows API for this is GetBinaryType. You can call this from Python using pywin32: import win32file type=GetBinaryType("myfile.exe") if type=

create a JAVA Standalone executable application to run on different platforms without any Installation

人盡茶涼 提交于 2020-01-12 07:59:25
问题 I have created a run time image for my Java application using jlink and I would like to be able to ship my app as an executable to different platforms. Ideally, it would be a single file that a user can double click and start the application without the need for installing anything. Is there currently a good way to do this? 回答1: You can make an installer that installs the JDK and the application. Make the application an exe by using something like Launch4j and for a Mac executable follow this

how to make a python file run without py extension

南楼画角 提交于 2020-01-12 07:31:11
问题 I had a small python script that takes input from the command line arguments and done some operations using the inputs taken and display the result Below is the working example code some_file.py import sys arguments = sys.argv first_name = sys.argv[1] second_name = sys.argv[2] print "Hello {0} {1} !!!!".format(first_name,second_name) Now i am executing this as python some_file.py Steve jobs Result : Hello Steve Jobs !!!! Now what all i want is, i don't want to use python command before file