Announcement

Collapse
No announcement yet.

Need help with error 493 (can't find include files)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with error 493 (can't find include files)

    I haven't used Powerbasic 10 for over 4 years and I want to get back into it, but I have since upgraded my system to Windows 10. I found that everything I try to compile gives me an error 493, can't find the include files. The files are there and I'm pretty sure nothing else has them locked. I checked the system variables and had to update the PATH with the location to the include files and restarted the system. Still no luck. I know I have seen this before but I can't remember all the possible things is could be ... can someone please refresh my old brain as to some of the things I can look at to resolve the error and start compile again
    Thanks,

    Doug Gamble
    [email protected]

  • #2
    Hi Doug,

    Did you reinstall PBWin or just copy the folders?

    Check the settings in PBEDIT.EXE, Windows/Oprtions.. Compiler.

    The settings there should relate to the PBWin.ini file - should be in the PBwin10/bin folder. If that file is corrupted just delete it - a new copy will be generated next time you run PBEDIT.EXE.
    Rgds, Dave

    Comment


    • #3
      I tried to post this before, but apparently it got lost

      Click image for larger version

Name:	includes.jpg
Views:	94
Size:	24.6 KB
ID:	783687

      Comment


      • #4
        Doug,
        If you copied the files to a CD or DVD then copied them back on the upgraded system the files may still be write protected/read only. Right click on the PBWIN10 folder and select properties from the context menu. Uncheck [] read only and click OK. A confirm attribute change dialog will pop up. Click OK.

        Additionally, you might want to verify the ownership of the files too. I had a problem with that on at least one fall update.

        Comment


        • #5
          It doesn't matter if the API include files are Read Only. (In fact it's a good idea to have them RO to avoid accidental changes).

          Comment


          • #6
            Yes, however, It does matter if the PBWin.ini file is read only which can easily be fixed as Dave pointed out by deleting it (assuming you have the permissions to do that). If the PBWin.ini attribute is RO then likely all the .bas files and .exe files are RO as well. My suggestion was an easy fix for them all. You can set the RO attribute for just the includes using the same technique on just the WinAPI folder just to be on the safe side as Stuart points out.

            Error 493 should be fixed by Dave and Stuart's techniques.

            I was just pointing out that Doug may run into trouble later on when he next indicates the compiler cannot compile an old program. At that point it becomes a question of permissions and attributes. (not considering "Cannot compile because the program is already running.")

            Just looking down the road.

            Comment


            • #7
              Great ideas guys ... Stuart's idea fix it by correcting the path in options (it has a bad path in there) but now I'm getting a problem with the MMSSTEM.INC file and a mismatch with a previous definition (?!?). Could I have out-dated include files somewhere? Should I update them? It all worked the last time I used it (in 2015).
              Thanks,

              Doug Gamble
              [email protected]

              Comment


              • #8
                Doug,
                Try one of the built in apps for PBWIN 10. Does it compile?

                NOTE:
                If you have an include link to both WinAPI and J Roca includes it will not compile. Only use one or the other. Not both.

                MMSSTEM.inc

                Do you not mean MMSystem.inc?

                Also if you Declare a function in your app and it does not match the declare in the includes then you will get a miss match. There can be other issues too like the wrong data type being used for a function variable.
                Last edited by Jim Fritts; 8 Aug 2019, 05:24 PM.

                Comment


                • #9
                  Originally posted by Jim Fritts View Post
                  NOTE:
                  If you have an include link to both WinAPI and J Roca includes it will not compile. Only use one or the other. Not both.
                  That is incorrect. Did you not see my screen shot? It's been like that for years and works perfectly.

                  When I want to switch between includes I just have to click on the button beside the list of include files and then click on the "Move Down" button.

                  Comment


                  • #10
                    Originally posted by Doug Gamble View Post
                    Could I have out-dated include files somewhere? Should I update them? It all worked the last time I used it (in 2015).
                    That usually means that you are trying to compile source code written for a an earlier version of PB or you are compiling something with Joses includes which were written for PB includes, or vice versa.

                    You need to find what it is you are declaring that is also declared in an inc file. There are a few common ones that crop up. "Pos" is a frequent culprit when going from PB 9 to PB10 source code If you can show us some failing code, someone here may well know where the problem lies.







                    Comment


                    • #11
                      Morlock,
                      Still only running one include link. Not both. He was using PBWIN 10 in 2015. He did not mention a change in compiler. He said, the last time he ran it the compiler worked fine. That is why I suggested he check it by running a PBWIN built in app. Less confusion doing that. Once that is confirmed then we can help him further to sort out the oddities he is dealing with.

                      Perhaps he had functions declared the way they are in J Roca's includes but now he is trying to compile it with PBWin includes. Doug see if a built in app compiles. Let us know.

                      Here is an example in J Roca MMSystem.inc:
                      Code:
                      '/* wave data block header */
                      ' // Size = 32 bytes
                      TYPE WAVEHDR BYTE
                         lpData          AS ASCIIZ PTR   ' LPSTR       lpData             /* pointer to locked data buffer */
                         dwBufferLength  AS DWORD        ' DWORD       dwBufferLength     /* length of data buffer */
                         dwBytesRecorded AS DWORD        ' DWORD       dwBytesRecorded    /* used for input only */
                         dwUser          AS DWORD        ' DWORD_PTR   dwUser             /* for client's use */
                         dwFlags         AS DWORD        ' DWORD       dwFlags            /* assorted flags (see defines) */
                         dwLoops         AS DWORD        ' DWORD       dwLoops            /* loop control counter */
                         lpNext          AS WAVEHDR PTR  ' struct wavehdr_tag FAR *lpNext /* reserved for driver */
                         reserved        AS DWORD        ' DWORD_PTR   reserved           /* reserved for driver */
                      END TYPE
                      Here is the same in PBWIN
                      MMSystem.inc
                      :
                      Code:
                      ' wave data block header
                      TYPE WAVEHDR
                          lpData          AS ASCIIZ PTR  ' pointer to locked data buffer
                          dwBufferLength  AS DWORD       ' length of data buffer
                          dwBytesRecorded AS DWORD       ' used for input only
                          dwUser          AS DWORD       ' for client's use
                          dwFlags         AS DWORD       ' assorted flags (see defines)
                          dwLoops         AS DWORD       ' loop control counter
                          lpNext          AS DWORD       ' reserved for driver
                          reserved        AS DWORD       ' reserved for driver
                      END TYPE
                      lpNext is defined differently.

                      Comment


                      • #12
                        Originally posted by Jim Fritts View Post
                        Morlock,
                        I'm trying very hard to remain civil, but you are making it exremely difficult.


                        Comment


                        • #13
                          Originally posted by Jim Fritts View Post
                          Morlock,
                          Still only running one include link. Not both.
                          Again, false. That option specifies the search order when looking for any .inc files. If a specified file is not found in the first location, the compiler will look for it in the second location.

                          Many of us have a collection of debugged include files for things such as compression routines, MS Office application COM interfaces, USB drives and backup processes, sqlite, SQLTools, GDI etc, etc, etc.

                          Keeping them all in one place rather than having multiple copies makes a lot of sense. The easy way to do that is:

                          Click image for larger version  Name:	stdIncludes.jpg Views:	0 Size:	32.9 KB ID:	783735

                          You then just #INCLUDE filename and the compiler will search in each of those locations in turn until it finds a match.

                          Comment


                          • #14
                            Sorry Stuart,
                            Please pardon me.
                            I was more concerned with USER declared functions not matching what is in the includes as he stated "mismatch with a previous definition(?!?)". Still waiting to hear if he can compile a built-in app.

                            I usually just build my own include by extracting all the needed Functions, Subs, Types, Unions, Macros, GUID$, Interfaces, Static equates, etc. No wasted time for the compiler weeding through all the includes. Very simple to do using Gary's gbSearchLite.exe. The result is very compact and light. Easily go from 200,000-400,000 lines of code to 32,000 lines of code. Saves me time every time I compile since there is no need to extract anything else.

                            No I am not concerned if the includes change in the future.

                            Comment


                            • #15
                              There IS a solution to incompatible include files, if you need a capacity in one include set that cannot be used in another include set, build the code is an SLL as this completely isolates the code from external sources. Then use the "#link yoursll.sll" to include the SLL file you have written. You also have the option to write your own prototypes (declarations) so you don't have to suffer anyone elses prototypes.
                              hutch at movsd dot com
                              The MASM Forum

                              www.masm32.com

                              Comment


                              • #16
                                All,
                                Now that the air is quiet...

                                Note:
                                Likely you would run into trouble if you had them listed like this:
                                "C:\PBWIN10\WINAPI"
                                "C:\PBWIN10\RocaInc"


                                Since everything that is defined in WINAPI is also defined in RocaInc (some the same and some not, see post #11 example) and if the links are listed like my example then you will be playing a risky game with dependencies.

                                Stuart,
                                In your case RocaInc is listed first. That makes it the primary link for all API definitions. WINAPI is never used.
                                That is why I said you are only pulling from 1 link. Yes, even though WINAPI is not needed I understand you put it in there for convenience sake.

                                In my example (which I do not recommend) you would be pulling from both links depending on what you are trying to achieve. (the code segments you need)

                                That is why I only list one (RocaInc) of the two. Not both. I hope you understand my meaning now. "Sure, I knew you would."

                                Also I'm pretty certain José was very explicit about not mixing WINAPI includes with his includes. How many times has he had to remind folks of that fact?
                                Perhaps not enough yet; so yes, this is a friendly reminder of his exhaustive but friendly reminders. Ha Ha

                                See José we are learning.

                                Any luck Doug?
                                Last edited by Jim Fritts; 10 Aug 2019, 12:44 PM.

                                Comment

                                Working...
                                X