QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Cobalt on January 27, 2022, 01:27:26 pm

Title: Why is an empty include file "not found"?
Post by: Cobalt on January 27, 2022, 01:27:26 pm
Was prepping my program to chuck some finalized SUBs into an include file and pre-made the include file and added the include line and it gave the error that the file was not found.

Whats the deal?

  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Why is an empty include file "not found"?
Post by: FellippeHeitor on January 27, 2022, 01:30:30 pm
Is an include including another include that's already been included? From the screenshot it looks like there's some weird cross includes going on there.
Title: Re: Why is an empty include file "not found"?
Post by: FellippeHeitor on January 27, 2022, 01:34:23 pm
Ah, I see the title mentions it's empty. QB64 is probably checking for content to determine if the include exists, there you have it. It'll go away once you include a file with actual content.
Title: Re: Why is an empty include file "not found"?
Post by: Cobalt on January 27, 2022, 01:37:29 pm
Nope, it seems to append whatever line to the error.

Just hates an empty file for some reason.

Why should it care though?
 
Title: Re: Why is an empty include file "not found"?
Post by: FellippeHeitor on January 27, 2022, 01:42:23 pm
You know how in the old days, before we had _FILEEXISTS we would open a file for BINARY and check if LOF() > 0? That's it.
Title: Re: Why is an empty include file "not found"?
Post by: Cobalt on January 27, 2022, 01:45:08 pm
Ah, gotcha.
Title: Re: Why is an empty include file "not found"?
Post by: FellippeHeitor on January 27, 2022, 01:57:59 pm
Checking the source code again, $Include manager does use _FileExists first already, so it's something else.

Also, I created an empty file and tried including it, and didn't get any issues. You've managed to create a unique environment with your structure for the error to pop, so we'd need further investigation into that.

  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Why is an empty include file "not found"?
Post by: Cobalt on January 27, 2022, 02:19:49 pm
Oh. Let me play with it a little.. wonder if you need "Certain kind of" code before the include?  I'll try some variations..
Title: Re: Why is an empty include file "not found"?
Post by: Cobalt on January 27, 2022, 02:27:51 pm
Well thats not it, with a clean IDE up no other code but what you have in your example and the error still arises.

  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Why is an empty include file "not found"?
Post by: FellippeHeitor on January 27, 2022, 02:56:45 pm
Try with the latest Dev build then, which is what I have. If it's an interaction with your OS then I won't be able to assess it immediately.
Title: Re: Why is an empty include file "not found"?
Post by: Cobalt on January 27, 2022, 03:44:11 pm
Try with the latest Dev build then, which is what I have. If it's an interaction with your OS then I won't be able to assess it immediately.
shoot, I uploaded the wrong image with the last post, same with the latest DB(just downloaded before I made the last post)
Happens on Win 10 as well.
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Why is an empty include file "not found"?
Post by: FellippeHeitor on January 27, 2022, 03:49:05 pm
I'll test it in a Windows machine soon. But since it's not something one would do in a normal scenario (including an empty file) I believe we're safe in calling this low priority.