Announcement

Collapse
No announcement yet.

PBForms RC error

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

  • Edwin Knoppert
    replied
    >I am not sure why you responded so strongly.

    That must be a feeling, i re-read and it looks fine to me

    Leave a comment:


  • Tom Hanlin
    replied
    Oddly enough, RC is essentially a stripped-down, specialized C compiler. So, it does pay to be aware of C escape code handling in literal strings.

    Leave a comment:


  • Peter House
    replied
    Edwin,

    I am not sure why you responded so strongly.

    What I wrote is correct - it works.

    I agree rc.exe may be c style based, which did not exactly occur to me since what I did WORKED and I had no need to go further on this issue. rc.exe is a resource compiler and NOT a c compiler which is how I thought of it at the time. The lfn in quotes, as I wrote, works correctly.

    I did not realize how WRONG my post was . . . since it WORKED!!!

    I stand by the statement "Computers only do what you TELL them to do - NOT what you WANT them to do."

    Hopefully you are fortunate, as I am, to be able to TELL them what you WANT them to do MOST of the time .

    Leave a comment:


  • Tom Hanlin
    replied
    You can use forward slashes as path delimiters to avoid the problem.

    PB/Forms gets some of its settings from the PBWin.ini file created by the PowerBASIC IDE. In the unexpected case where you run PB/Forms without ever having run the IDE even once, there will be no PBWin.ini file available, which will cause failures such as RC errors when compiling. Yes, this should be handled more gracefully.

    Leave a comment:


  • Michael Mattias
    replied
    >#include "C:\Program Files\PBWin90\WinAPI\Resource.h"
    ==>

    I think "no quotes, escaped slashes" works, too:

    #include C:\\Program Files\\PBWin90\\WinAPI\\Resource.h

    Leave a comment:


  • Edwin Knoppert
    replied
    >Computers only do what you TELL them to do - NOT what you WANT them to do.

    Unless you read about the subject..?
    Your example is wrong, your remark is wrong..
    Remember, many 'compilers' ms makes are c-style based.

    >#include "C:\Program Files\PBWin90\WinAPI\Resource.h"
    This line is wrong since \ means something special in c.
    There is nothing wrong with rc.exe in this respect.
    Since windows95 we have long filenames so quotes are required which means text instead of instruction (like this is false since it is a lfn, a sfn would be succesfull: #include C:\Program Files\PBWin90\WinAPI\Resource.h)

    Leave a comment:


  • Peter House
    replied
    Final Issue Resolution

    I got it!

    Inside the .rc file is a pointer to resource.h

    #include "Resource.h"

    For the resource compiler to find this file, either the system search path must be set properly or the #include line can me modified with the complete path information like this:

    #include "C:\Program Files\PBWin90\WinAPI\Resource.h"

    I originally thought it was due to my altered program file path as PBWin defaults to installation in the root directory and I have it installed under "Program Files"

    The problem turns out my system path was too long and during the installation of PBWin the path was truncated. Too many old DOS compilers with paths!!!

    I tried using the latest rc.exe (and rc_dll.dll and resource.h) from dot.net and other than a much more nicely formatted, equally uninformative error message, and 70K size instead of 7K - there was no difference in output.

    My fix was to clean up the truncated system search path and then make the resource.h pointer absolute and complete in the .rc file.

    Good Luck with yours . . .


    Computers only do what you TELL them to do - NOT what you WANT them to do.

    Leave a comment:


  • Roger Garstang
    replied
    Not the newest version either. I use mine from VS2008 to support all icons, etc.

    Leave a comment:


  • Michael Mattias
    replied
    rc.exe is not exactly leading-edge.

    Leave a comment:


  • Peter House
    replied
    I had the exact same problem - only different!

    On my Laptop, Installed the PB9.01-9.02 then PB9.02-9.03 updates and then installed PBForms 2

    Opened and created a simple form and upon saving received this same RC1107 error.

    I open the file in PB and checked the Paths and they were set.

    I then edited the INCLUDE lines in the editor with the complete path to the API files. Note - I install all the PBWin folder under Program Files instead of the C: root.

    After opening in PBForms - the problem is gone.

    Open again in PBWin and the INCLUDE Paths are gone and everything still works.

    Ghost in the Machine?

    Peter House

    Leave a comment:


  • Bud Durland
    replied
    I found the issue. I hadn't yet updated the "include paths" in PowerBasic. Once I did that, the problem was resolved.

    Leave a comment:


  • Michael Mattias
    replied
    Also check if the path you are in is 'really long.' IIRC there have been cases where the regular compiler (not PBForms) has problems when this is true.

    Leave a comment:


  • Bud Durland
    replied
    I know I used the word project, but I'm not in the compiler, I'm in PBforms. Apparently, PBForms tries to compile the .rc file when the .bas file is saved. Since it's PBFORMS, there's only one source file involved.

    I know this isn't an official support area, but whenever I see something like this, I always first assume that I probalby did something wrong, and that there's a chance someone else made the same mistake, so I asked here first.

    Leave a comment:


  • Michael Mattias
    replied
    There would be a filename.rclog file in current folder. (There is when using RC/PBRES from compiler IDE), that would include specific errors......

    Except "invalid usage" generally would mean the command-line was in error and the resource compiler never even started, so you would not have an "RCLOG" file.

    Since you don't control the command-line, you'll have to send your problem to PB Support for resolution. (This board is NOT an official support venue).

    For a quick check, see if you have any spaces in any of your project file names; if you do, change to a folder which doesn't and try from there.

    MCM

    Leave a comment:


  • Bud Durland
    started a topic PBForms RC error

    PBForms RC error

    I'm using PBForms 1.51.0068

    I'm updating a project that hasn't been touched in a while. When I try to save, get this error:

    RC: Fatal Error RC1107: invalid usage, use RC /? for help

    At that point I'm pretty much stuck; I have to close PBforms and tell it I don't want to save changes. It seems, though, that the changes I made to the form layout were saved anyway.

    How, here's the curious part. While that error is displayed, if I switch to another app then back to PBForms, the workspace is cleared and I'm told that the .rc file has been changed by another application, and would I like to re-load it.

    What should I look for?
Working...
X