No announcement yet.

Trouble compiling in PB/DLL 2

  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble compiling in PB/DLL 2

    I have been unable to compile any source code in PB/DLL 2 that contains a LibMain function. When I attempt to do so, I get a 481 error, "Parameter mismatch with prior declaration".

    Now before anybody gets upset because I haven't included my source code, I tried to compile the TEMPLATE.BAS file in the SAMP16 folder and got the same response! Have I missed something obvious?
    If you try to make something idiot-proof, someone will invent a better idiot.

  • #2
    That means your parameters for FUNCTION LibMain do not look like:

    FUNCTION LibMain (BYVAL hInstance AS INTEGER, _

    BYVAL wDataSeg AS WORD, _
    BYVAL wHeapSize AS WORD, _


    You are using $COMPILE EXE instead of $COMPILE DLL when a FUNCTION LibMain appears in your code.

    My TEMPLATE.BAS compiles just fine. You sure you didn't add a function which has different parameter types on the DECLARE line versus the FUNCTION Header?

    When the compiler gives you the error message, what line number does the error occur on?

    Michael Mattias
    Racine WI USA
    [email protected]

    [This message has been edited by Michael Mattias (edited February 05, 2000).]
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]


    • #3
      I just checked the LOG file for my attempt at compiling the TEMPLATE.BAS file and it said that it was trying to use PB/DLL 6 to compile it. I checked the options in the PB/DLL 2 Compiler Shell and noticed that the default name for the command-line compiler was PBDLL.EXE instead of PBDLL16.EXE (must be a hang-over from when it was sold separately). I've changed this and it compiles fine now.

      [This message has been edited by Matthew Berg (edited February 05, 2000).]
      If you try to make something idiot-proof, someone will invent a better idiot.