NASM Forum > Programming with NASM
File input error
gidak:
Hi to all :)
I am programming a program that will be a kind of IDE for programming nasm
my program is in c# and i run the compiler like this
--- Code: ---
Process p = new Process();
p.StartInfo.Arguments="-f bin hi.asm -o hi.bin";
p.StartInfo.FileName = @"C:\nasm.exe";
p.Start();
--- End code ---
but when i run it i get a:
--- Quote ---nasm fatal unable to open input file
--- End quote ---
how can i fix this?
I looked at more threads that had the same problem but I cannot find the answare.
Just to make it clear: The file names are all correct and the paths.
p.s. If theirs a another way to compile nasm code from in a program ill be happy to here
Rob Neff:
--- Quote from: gidak on April 25, 2011, 09:55:48 PM ---
--- Code: --- p.StartInfo.FileName = @"C:\nasm.exe";
--- End code ---
--- End quote ---
Are you sure that you don't really mean:
--- Code: --- p.StartInfo.FileName = @"C:\\nasm.exe";
--- End code ---
Notice the extra backslash in my example. Your example contains an escaped newline char '\n'asm.exe
Just a hunch as I'm more of a regular C/C++ guy myself...
gidak:
It works ether way And i did try tow slashes (all options 2 back 2 front 1 back 1 front)
plus i dont think the problem is in the path cos it gets to nasm.exe but nasm is making the trouble (I think, probably with help of my code ;) )
edit: Got it working, frgot to add:
--- Code: ---p.startinfo.workingdirectory=@"c:\\";
--- End code ---
man how im stupid ;)
Frank Kotler:
(No, "stupid" people don't do asm at all! :) )
You mention "another way"... I've done something similar - in asm, for Linux, using "sys_exec" to run Nasm from within my program. I don't think it'll be any use to you, but I'll post it if you want...
Best,
Frank
gidak:
Ill be happy if you post it :)
nothing like getting more input to my brain XD
edit: BTW is their a archive of old nasm source code? (Not code demos)
Navigation
[0] Message Index
[#] Next page
Go to full version