I built an executable in matlab that converts a .mat file to txt. I am trying to compile it for standalone use on another computer. I added the MCR and it compiles and runs just fine on my computer but on other computers, after installation, the .exe doesn't do anything.
I tried it again with 'Hello world' and I am getting the same result. I call the exe in command prompt but nothing happens.
Your .exe file is probably missing a shared library. If that's the case, it won't run properly until you have the library installed on the other computer. This link also looks like it might help you. http://www.mathworks.com/matlabcentral/answers/23369-generating-standalone-executable-file-using-matlab-coder
Related
I am trying to install some commercial software that was written in Java for a Windows computer operating system. I have downloaded Java from their site and I have also downloaded the JDK package for a 64bit windows system so to my knowledge I should have everything I need to have java work. I then create a shortcut of the java exectuable javaw.exe and edit the target path and the start in path to my specifications but when I go to execute it, it tells me that it "Could not create Java virtual machine".
Does anyone know how to fix this error?
Luke H
How are you creating the shortcut? In windows, this might not be the correct approach.
Does the installer use an embedded version of java? It is possible that the software uses some native libraries that aren't compatible with 64 bit java.
Depending on the setup script, it may be passing invalid command line arguments to the version of Java you installed.
Its a bit late, but this might help others later.
Here's what worked for me:
Target: "C:\Program Files\Java\jre1.7.0\bin\javaw.exe" -classpath C:\OLINDA olinda
Start in: C:\OLINDA
It seems that you don't know how properly start the Java Virtual Machine, in Windows, the JVM can be started with two executables one is java.exe and the other one is javaw.exe, both do the same, the only difference is that java.exe is a command line tool (so you'll see a command line when you start your application) and javaw.exe simply omits the command line. Both use the same paramaters that can be found here: http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/java.html, from this the shorter way to open a Java program will be:
java MainJavaClass.class
or
java -jar JavaProgram.jar
Most commercial programs are packed in jar files so probably you will use the second approach, but also be warned that usually commercial Java programs use a native wrapper so you can simply launch a native application (in Windows .exe), without the need to set anything, so you may need to create a shortcut for it instead of the java.exe program, in the case you really need to call the Java program through the JVM, then what you need to change is the Target field so you include the parameters you need to pass to it like this:
"C:\Program Files\Java\jre7\bin\java.exe -jar JavaProgram.jar"
Another way could be use a batch file to start the program and create a link to it instead.
I have an program which has the dependencies of MSVCP100D.DLL and MSVCR100D.DLL, x64 version.
This is the screenshot of DependencyWalker in my computer:
When I copy this program to my friend's computer, it can't run since there are no such two files. Then I copied the 2 dll files to his computer.
But it reports some error when executing the program, and when I use dependency walker to check, I found a very strange thing. This is screenshot from him:
Why they are "x64" in my computer and "x86" in his computer? How to fix it?
Update
My friend's system is win7 x64 too.
Finally, after several hours, we fixed it. There are too many strange things.
First. My system is win7 x64.
Here take MSVCP100D.DLL for example. There are two different MSVCP100D.DLL in my computer, one in windows/system32, one in windows/SysWOW64. They have different sizes.
Look at the screenshots:
But in "everything" they have same sizes(even same modified date), that I thought they are the same.
Then I send the dll from system32 via an IM software called QQ.
I dragged the file from windoes/system32 which is 991K, but QQ displayed the size is "726K":
But, if I copy the file into another dir, e.g. D:\, then send it again, the size is correct "991K".
Finally, I copied these dll files into another dir, and package them into zip file, they are sent correctly, and the program run well on my friends' computer.
How to make single executable file ( not installation file) that run on every windows 7 . without needing any type of specific framework or platform .
For example if i make c# application and try to run on another system, it require dot net framework. How can i get rid of this problem.
Which Language or IDE i use to make independent executable file.
I don't know if it is exactly what you want,
but why not just write a c application that only makes use of Windows API and compile this one into an executable file?
IDE's compile it for you and you can run this *.exe on any computer you want.
A friend sent me 4 files (two .m files, one .pch file, and one .h file) that he says compile together into an Objective-C program. From what I understand, it's an Apple language, and I use Windows. I've been trying to compile it in a new project on Dev-C++, but haven't had any luck. After some research, I downloaded a special Objective-C library for it and selected "Yes" under "Link an Objective C program," but am getting a build error when I try to compile it.
The code uses Cocoa, but according to my friend, it will work the same in Windows if I import Foundation.h instead of Cocoa.h. I found a tutorial on how to compile Objective-C programs in Windows here, but I don't understand step 2 (which is "Set environment variable for GCC compiler (C:\GNUstep\mingw\bin\gcc.exe)") since that file doesn't exist on my computer. When I follow the compilation instructions, I get this error: sh: gcc: command not found. If possible, I'd rather compile it in a GUI-based compiler, as I hate working with command prompts.
Any help with compiling these files on any program is greatly appreciated!
Time to cowboy up, and learn some command line compiling.
First, you need to install the GNUStep on your machine.
Then, set the appropriate environment variable to point to whereever you installed GNUStep to.
Now you should be able to finish the tutorial.
GNUStep is designed to let developers build cocoa applications on a variety of platforms.
Environment variables are named strings that exist for all processes in Windows. If you open a cmd window and enter the command SET you will see a list of all the currently defined environment variables.
On Windows XP, add a new one by right clicking My Computer and selecting properties. Then hit the advanced tab and click on the environment variables button at the bottom. You can either add the variable for just you or for all users on the system.
I don't know how to set environment variables for later versions of Windows but I expect Google might have some useful links.
From some of your comments, it is clear you haven't installed GNUStep in the same place as the instructions. Just do a file search for gcc.exe to find out where you have installed it.
I'm using Powerbuilder to call an external function from a DLL created in C#
If I generate an executable it works fine, it call the web service perfectly well, but when I'm trying to run it in "development" mode it don't use the "application_name.exe.config" file.
I tried to set "app.config" file hard coded in the DLL, but I was unsuccessful
Clues to resolve this issue?
I think you described it yourself: you're looking for it to use something used by the EXE when you're running from development mode. When you run from development mode, there is no EXE generated or used, so Windows won't be leveraging functionality linked to the EXE. (PB starts your application so quickly because it is only loading the application to the virtual machine and running its Open event.) If you need this, it sounds like you'll have to include Deploying of the EXE and running it as part of your testing cycle.
Good luck,
Terry.
When you compile and run from the exe you're using your exe. But when you run from the dev environment you're actually using pbxxx.exe (pb115.exe, pb110.exe etc.). You may be able to copy the "application_name.exe.config" into your pb directory and rename it something like pbxxx.exe.config. At least that's the way it works with manifest files -- I had two, one called appname.exe.manifest and one called pb115.exe.manifest.
Just curious but how many libraries/objects are in your application?
I have some very large applications and the longest any of them takes to do a full build is about 30 minutes. Something odd about your aapplication for it to take 2 hours to do a full build.
DLL's dont have config files. Only EXE's.