Author Topic: Why is an empty include file "not found"?  (Read 4346 times)

0 Members and 1 Guest are viewing this topic.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Why is an empty include file "not found"?
« 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?

  [ You are not allowed to view this attachment ]  
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: Why is an empty include file "not found"?
« Reply #1 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.

FellippeHeitor

  • Guest
Re: Why is an empty include file "not found"?
« Reply #2 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.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Why is an empty include file "not found"?
« Reply #3 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?
 
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: Why is an empty include file "not found"?
« Reply #4 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.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Why is an empty include file "not found"?
« Reply #5 on: January 27, 2022, 01:45:08 pm »
Ah, gotcha.
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: Why is an empty include file "not found"?
« Reply #6 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.

  [ You are not allowed to view this attachment ]  

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Why is an empty include file "not found"?
« Reply #7 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..
Granted after becoming radioactive I only have a half-life!

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Why is an empty include file "not found"?
« Reply #8 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.

  [ You are not allowed to view this attachment ]  
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: Why is an empty include file "not found"?
« Reply #9 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.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Why is an empty include file "not found"?
« Reply #10 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.
  [ You are not allowed to view this attachment ]  
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: Why is an empty include file "not found"?
« Reply #11 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.