How do I get Photran to work with my favorite compiler?
- Photran does not call your compiler directly. It just invokes make and make calls your compiler. So, you need a makefile for your program. Photran has to know which compiler you are using so that it can parse the error messages, since different compilers use different formats for error messages. And we have a not-very-well-working feature (Managed Make) that is supposed to write a makefile for you automatically, which will be great when it works, but should be avoided at the moment. All the rest of Photran is completely independent of your compiler.
- If you don't know what a Makefile should look like, there's a tutorial from an introductory CS course at UIUC , or another from the University of Hawaii ... or you can read the entire manual for GNU make .
Photran is running out of memory (I'm getting java.lang.OutOfMemoryError).
- Under Linux, add -vmargs -Xmx512M to the end of the command line, i.e., launch Photran with a command like
/usr/local/bin/photran -vmargs -Xmx512M
- Under Windows, create a shortcut to Photran's "eclipse" executable. Right-click the shortcut, and choose Properties. In the box containing "eclipse.exe", add -vmargs -Xmx512M, so the entire line will read something like this:
"C:\Program Files\Photran\eclipse.exe" -vmargs -Xmx512M
- For what it's worth, all arguments following -vmargs are passed directly to the JVM; -Xmx512M is a request to make 512 MB of heap space available to Photran.
When I create a project, I get the error "Error launching external scanner info generator (gcc -E ..."
- You need to have GCC (the GNU C compiler) installed. Under Windows, make sure you have followed the instructions here to install Cygwin (including GCC) and put it on your Windows PATH. Most Linux distributions include gcc.
I can't get Photran to run my program ("Launch failed no binaries" or some such error message).
- In the Project menu, select Preferences, and make sure that the correct Binary Parser is selected for your platform: PE for Windows, Elf for Linux, Mach for OS X.
- Your workspace path cannot have spaces in it. A workspace in C:\Documents and Settings\whoever\My Documents for example, will give this error.
- If you are using g95, it has some of its own eccentricities. Spaces in the g95 path have also caused problems. If your binary "can't find cygwin1.dll", see the next question...
When I run my Fortran program, it complains that it can't find a particular DLL.
- When Windows looks for DLLs, it checks the following:
- The directory from which the application loaded.
- The current directory.
- The system directory (e.g., C:\Windows\System32)
- The 16-bit system directory.
- The Windows directory (e.g., C:\Windows)
- The directories that are listed in the PATH environment variable.
- So, for example, if cygwin1.dll is not found, it needs to be copied into one of the above directories. (NOTE: Despite Microsoft's documentation, it seems that directories on the PATH are not always searched; put the DLL in your application directory or the System directory to be safe.)
- This information was obtained from Microsoft's documentation for the LoadLibrary system call .
I get 'Cannot run program "make": Launching failed'
Do you have 'make' installed? Is it in your path? See the Photran installation instructions especially including how to set the PATH in Windows