No announcement yet.

Error 481 after Inclean with CRITICAL_SECTION

  • Filter
  • Time
  • Show
Clear All
new posts

    Error 481 after Inclean with CRITICAL_SECTION

    When I add a CRITICAL_SECTION to my code I get error 481 after running Inclean

    Here are the steps:

    1 Code compiles ok
    2 - add
    Instance myCriticalSection As CRITICAL_SECTION
    still compiles
    3 - run Inclean, then compile
    compile error: 481 Mismatch with prior definition
    line 126 Fllink AS LIST_ENTRY PTR

    Inclean has put this in my .inc file

    Flink As LIST_ENTRY Ptr
    Blink As LIST_ENTRY Ptr
    End Type

    which is a duplicate of what is in

    If I comment out the type in my generated .inc file, it then compiles. However, the next time I run Inclean, it puts it back.

    In my main .BAS file, I include first:

    ' turn off unnecessary stuff in
    %NOGDI = 1 ' no GDI (Graphics Device Interface) functions
    %NOMMIDS = 1 ' no Multimedia ID definitions
    #Include once "\pbwin90\winApi\"
    #Include "C:\pbwin80\ezgui40\includes\"

    #Include "c:\playback innovations\"
    #Include "C:\Playback Innovations\DS\" (the generated file)

    I saw USEMACROS mentioned in a prior posting and tried setting it to 0 or 1 and it didn't make any difference.

    Any ideas?


    If you use inclean, you shouldl not have to use or or any of the other include files that generally come with pbwin.

    If you have both, it will certainly cause a duplication at some point because inclean only checks the bas file and ignores any included api stuff.

    #include "" 'inclean file
    should replace
    #include ""
    where myprogram is the name of your inclean created file.

    I use inclean extensively and I think it's a great utility and also pbwin ddt jumpstart though i dont know if it's been updated
    for the changes in pbwin9+. The advantage to using inclean is a smaller program. Typically 2k to 3k or more depending on what include files you would normally use. This may not sound like much with the size of today's programs, but it can sure add up if you have a project that uses lots of programs. I have probably been able to reduce my Client Writeup by roughly
    500k using inclean.
    Last edited by Fred Buffington; 14 Apr 2009, 03:57 PM.
    Client Writeup for the CPA

    Links Page



      That took care of it. Thank you!