Hi,
I have tried to assemble an asm file with a batch file but fasm.exe could not find the included file in the same directory.

include 'Fasm_Dialog.Inc'

for this line fasm looking in to fasm binaries directory only. Any idea?

Thanks
Posted on 2003-06-07 19:36:30 by cakmak
A quote from the fasm.pdf


you have environment
variable INCLUDE set to the path of the include directory, which is the
part of flat assembler package. The path should not end with any path separator.
If you don?t want to define such variable in the system, or you have
such variable defined for the other program already, you can set it for the
flat assembler only by editing the fasmw.ini file in its directory (this file is
created by fasmw.exe when it?s executed, but you can also create it by yourself).
In this case you should add the Include value into the Environment
section. For example, when you have unpacked the flat assembler files into
the c:\fasmw directory, you should put the following two lines into your
c:\fasmw\fasmw.ini file:


Include = c:\fasmw\include


Maybe is fails locally if not set?
or the batch file steps out of the directory?

The pedemo loads the windows.inc fine on my machine when run from the gui.

Batch file issue and not a fasm one?

RobotBob
Posted on 2003-06-07 19:42:38 by RobotBob
Thanks,

But i am talking about my project include files. Not "include" directory. I need the path where my project stays. And dont use fasm ide. Anyway, the environment variable which you discussed is already set.

Regards
Posted on 2003-06-07 20:57:58 by cakmak
Hm. Strange. I don't know about console version, but FASMW includes properly the files from the directory of the compiled file. I am working all the time this way and all is OK. Maybe you changes directory in the batch file or it's a simply misstake in the file name???
Posted on 2003-06-08 03:35:26 by JohnFound
Speaking of include and enviroment variables, this is how I've fixed it for me:
First I've set a system wide envrioment variable:
set fasminclude = D:\fasm\include

Which I use in all my fasm files (even the include files in D:\fasm\include)
if I wan't to include win32ax.inc, the I type this:
include '%fasminclue%\win32ax.inc'

I use fasminclude becuase I dont' want to use include, since it's used by other compilers.

And in my project I tend to have one include for this, and one for that, ..., all in teh same foler or in subfolders, and I simply include them like this:
include 'edata.inc'
include 'res\rsrc.inc'
(on occasion I even have done this: incldue '..\file.inc', no problems)

I have no problems with either the console of GUI version of fasm (1.47 (1.46.9.4)), I think JohnFound is right, you might have misspelled the file name.
Posted on 2003-06-08 04:49:58 by scientica
Thank you all for replies,

I am using fasm+alink 1.46. Environment variables for includes directory is easy task and already set. Say i have an include file that contains project specific constants or some procedures in the same folder. What will i do?

Btw, i have re checked and any misspelling. I wonder, fasm+alink 1.46 different?

Anyway i will test this.

Regards
Posted on 2003-06-08 08:31:39 by cakmak
Yes, fasm(DOS) could find the includes like,

include 'inc\project.inc'

but fasm+alink can not. Btw, i have tried,

set include=E:\fasm\include;%include%

as environment variable. And tried,

include '%include%/win32a.inc' for standard include files but get,

flat assembler version 1.46
sclass.asm [27]:
include '%include%\win32a.inc'
error: file not found.

then i am using,

path = e:\fasm\include;%path%

for environment variable and using,

include 'e:\fasm\include\win32a.inc'

in asm files. Anyway this solved. But why environment variable could not recognised did not understand(any version, except using fasm ide). This assembler is a little hard and different to set.

Any more help?

Thanks
Posted on 2003-06-08 17:28:59 by cakmak

but fasm+alink can not. Btw, i have tried,

set include=E:\fasm\include;%include%

as environment variable. And tried,

include '%include%/win32a.inc' for standard include files but get,

flat assembler version 1.46
sclass.asm [27]:
include '%include%\win32a.inc'
error: file not found.

Aha, I've had some similar problems with enviroment variable with multiple paths (semi-colon divided). Try compile your app like this:
set old_inc=%include%

set include=E:\fasm\include
fasm input.asm output.exe
set include=%old_include%
set old_include=
Posted on 2003-06-09 05:32:30 by scientica
Thank you scientica:alright:
Posted on 2003-06-09 17:47:24 by cakmak