Here's my problem
I've been searching for a while now on how to compile a pascal program in notepad, then immediately running it after a successful compile.
So far, I've managed just to find a compile script for NppExec, which goes like this :
PATH_TO_FPC\ppc386.exe "$(FULL_CURRENT_PATH)"
I've tried combining this script with another script for compiling and running C/C++ programs in notepad++
cmd /K DPATH-TO-FPC\ppc386.exe
"$(FULL_CURRENT_PATH)" -o
"$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
but I always get a message, when I try to run it.
"Error: Illegal parameter: -o"
So I was wondering if anyone can help me with this, or post a complete solution if they know on a topic.
Thank You in advance.
Try to append -o with your output executable file. Which will be like this:
-o"$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
Related
sorry if it's a simple question, I'm a bit of a rookie and couldn't find the answer online.
I have a program in Fortran with a makefile that I need to run. I am able to run it through the terminal, by using mingw32-make command, but I'd like to do be able to do it through Geany as well.
When I just try to do it by pressing Make in Geany, nothing happens and a message at the bottom of the screen says Process failed (The system cannot find the file specified). From what I gather, I need to configure a new make command in Geany through Set build commands and that might solve the problem, but this is where I am lost. What exactly do I need to type in there? Do I need to direct it to mingw32-make? How do I do that?
This is what my Set Build commands window looks like now.
Thanks!
Two options
In your fortran bin directory copy mingw32_make.exe to make.exe.
In geany, change make to mingw32_make
The make in geany should then work.
I am trying to run an HLA code in Command Prompt from a code I have written in Notepad++ but I'm not sure how to find the program in Command Prompt. How do I locate the program? I believe it should look something like this, but I'm not sure:
cd ....
cd hla
After this I am stuck. The file is in the hla folder on the Local Disk C and it is called hej.hla
Thanks in advance!
This might help.
for windows: hla hej.hla
for Linux: ./hej
My command prompt won't run exe files without their extensions.
For example, help won't work, but help.exe works fine. Does anyone know what the culprit might be?
I have compiled one clipper program using haarbour compiler and the c file produced was compiled using djgpp to produce final exe. This exe runs fine in console window of Windows 98.
However, when I exit to msdos prompt or try to run in pure dos, it does not give any error. But did not go further. however num lock and cap locks responds propery. When I press ctrl+al+del it gives me message hdpmi terminated by the user. I have tried cwsdpmi instead of Hdpmi32 but the problem remains same.
There is on exe HBRUN.exe which acts as an interpreter to .hrb files produced instead of stand alone exe. When I run HBRUn in pure do,it behaved in the same fashion. But when I runit another directory where no dbf files were there, it gave me error dbf file not found ! This also works fine in console window but compiled for pure DOS.
I think there is some problem with all the exes produced using harbour and djgpp if they are big.
one simple 5-6 line program's .hrb file was run correctly in pure dos by hbrun ( Size of hbrun is about 1700 K where as my exe file size is 950 K
Can anybody shade some light ?
Sadly, you're unlikely to find any help here. I would suggest approaching the Harbour Project itself for help. They can be found on github with their list of developers (with email addresses!)
Harbour is powerful.
http://harbour.github.io/
To run in pure DOS I would recommend you to try OPENWATCOM
Here is a copy of the message from Pritpal Bedi (one of the developers):
I could compile Harbour with OpenWatcom DOS.
Machine : WIndows 7 32 Bits
STEPS:
Downloaded: http://ftp.heanet.ie/pub/openwatcom/open-watcom-c-dos-1.9.exe
Installed in C:\WATCOM. Follow all default options when installing except making changes to AUTOEXEC.bat and CONFIG.sys.
WATCOM will save these two files with .DOS as extention.
Copy C:\Watcom\autoexec.dos C:\Watcom\m.bat
Redefine PATH statement as : SET PATH=C:\WATCOM\BINW;C:\Harbour\bin\dos\watcom;%PATH%
Keep all other SETs intact.
CD to C:\Harbour
Execute C:\Watcom\m.bat
Execute DOS-MAKE [ Do Not use "install" option, it will pollute your existing environment ]
Harbour binaries will be deposited in C:\Harbour\bin\dos\watcom
NOTE [ And it is strange ] that steps 7 and 8 will have to be repeated for few times
as console window from where you are initiating it will disappear, but do not worry,
it seems to be an issue with memory.
CD to harbour\tests
Issue : hbmk2 hello -workdir= -run
It appears long command line do not go through, so we have to shorten the path and hence command line length.
Be cheerful as you will see "Hello World" printed in current console.
Pritpal Bedi
When attempting runCommand("cd", "..") from inside a js.jar console an IOException is thrown.
I believe it's because in the command prompt the CD command is actually built into the console and not a separate .exe file. The runCommand("notepad") works fine, and that .exe can be found on the classpath in the usual location.
Is there a work around for this?
I was thinking that changing the directory through java instead of through the command prompt it might solve this problem, but I don't recall how to do that from java, but I plan on trying to figure that out.
To sum up: Is there a way to run "cd" from within a Rhino JS console on windows?
Thanks,
L-
Multiple issues to solve here; it depends what you are trying to do.
runCommand actually runs executable programs. cd is not an executable on Windows; it is a command in the command shell. So you would need to execute something more like this:
runCommand("cmd","/c","cd <target-directory>")
However, the underlying Java runtime does not allow you to actually change the working directory anyway. See this StackOverflow discussion. So shelling out cd just changes the directory for the subprocess (the process running cd), which is probably not what you want.