flat assembler
Message board for the users of flat assembler.
Index
> Main > file not found |
Author |
|
revolution 13 Jul 2011, 10:55
Sources please. It is difficult to help without an example of the behaviour.
|
|||
13 Jul 2011, 10:55 |
|
edfed 13 Jul 2011, 11:22
the source file is here: http://fool.asm4u.net/fool0.zip
and you can try to have the error by compilation of shell.asm error, file not found source xhtml.inc(7 even if i delete the reference to this file (uninclude), it won't find another file, ive just tested now, and it don't find pixelcounter.inc. and so on until there are no includes. this problem is very strange, because i made no modification in the main source, just inserted a new include somewhere, some instructions elsewhere, like everytime i code. it is boring because it forces me to think about this bug instead of thinking about bugs in my recent code. with dos console version, it gives that: Code: C:\fool0>fasm shell.asm flat assembler version 1.69.14 (536557 kilobytes memory) applications/../applications/../applications/../applications/../applications/../ applications/../applications/../applications/../applications/../applications/../ applications/../applications/../applications/../applications/../applications/../ fool/xhtml.inc [78]: include 'Xhtml/charmodules.inc' error: file not found. |
|||
13 Jul 2011, 11:22 |
|
revolution 13 Jul 2011, 11:39
Your path length is too long.
Code: applications/../applications/../applications/../applications/../applications/../applications/../applications/../applications/../applications/../applications/../applications/../applications/../applications/../applications/../applications/../fool/Xhtml/charmodules.inc |
|||
13 Jul 2011, 11:39 |
|
edfed 13 Jul 2011, 11:49
here is the problem.
this file (charmodules.inc) is included this way: shell.asm>comsys.inc>fool/flist.inc>xhtml.inc>charmodules.inc there, i don't see the ../applications/../application/../ etc reccursion. in fact, i can't find where this reccursion come from. there are application includes that sometimes uses include '../comsys.inc' statement, but nowhere i can find why there is a ../aopplications reccursion. |
|||
13 Jul 2011, 11:49 |
|
revolution 13 Jul 2011, 12:32
SHELL.ASM includes comsys.inc includes APPLICATIONS.INC includes SHOWFPS.INC includes CPUTIME.INC includes comsys.inc ... infinite recursion.
|
|||
13 Jul 2011, 12:32 |
|
edfed 13 Jul 2011, 13:24
ho my god.
but habitually, fasm answers with a symbol still defined error to mean that the file is still included, that's why i didn't think about an eventual ../comsys uncommenting. habitually, this line (include '../comsys.inc') is inserted at the begining of any fool code to contain the framework. apparentlly, there is a limit to the detection of the duplicates of the symbols. what is fun is that fasm don't say symbol already defined, but file not found. that is a strange mystery. and like ever, thanks a lot revolution, your solution let me test my code now!!!! |
|||
13 Jul 2011, 13:24 |
|
revolution 13 Jul 2011, 13:32
include is processed by the preprocessor. Symbols are not processed until after the preprocessor is finished.
|
|||
13 Jul 2011, 13:32 |
|
revolution 13 Jul 2011, 13:44
Moving to main.
|
|||
13 Jul 2011, 13:44 |
|
edfed 13 Jul 2011, 14:11
ok, then, i think that if a file is not found, but present in the file system, means that there are recursive includes.
it can be cool to have a detection of the recursion in the paths. because as i can see, the recursion is limited here by the 256 byte path lengh of the system. |
|||
13 Jul 2011, 14:11 |
|
revolution 13 Jul 2011, 14:21
edfed wrote: because as i can see, the recursion is limited here by the 256 byte path lengh of the system. |
|||
13 Jul 2011, 14:21 |
|
typedef 13 Jul 2011, 14:22
revolution wrote: one bajillion. 1E2K |
|||
13 Jul 2011, 14:22 |
|
AsmGuru62 13 Jul 2011, 14:38
I believe, it is possible to guard against the multiple inclusions of the file. You just need to insert if/end if into every INC file you use, just like C/C++ language does with #ifndef/#define.
|
|||
13 Jul 2011, 14:38 |
|
revolution 13 Jul 2011, 14:42
AsmGuru62 wrote: I believe, it is possible to guard against the multiple inclusions of the file. You just need to insert if/end if into every INC file you use, just like C/C++ language does with #ifndef/#define. |
|||
13 Jul 2011, 14:42 |
|
edfed 14 Jul 2011, 22:11
another solution is to do like i did, ask to revolution for the solution.
and as the problem is fixed now, what is maybe possible is to do a sort of "include postcheck" or something like this. apparentlly, as the source is made, the compiler made 14 reccursions before to say: file not found. the ../ comes from the include '../comsys.inc' that will include everything else. maybe just a little code to check the presence of a path like "folder/../folder/../folder/../folder....." certainlly mean that there is a reccursive inclusion. then, the algo can be simple as: Code: if file not found then, call detectreccursion if reccursion, then, error = reccursion else error = file not found endif else error = no error endif |
|||
14 Jul 2011, 22:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.