Announcement

Collapse
No announcement yet.

Compile metastatement

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

  • Eric Pearson
    replied
    > The example #COMPILE EXE "ABC.BAS" ' Compiles to ABC.EXE seems
    > counter-intuitive, especially applied to DLL's.

    I'll admit it, I'm the "original idiot" on this one. I wrote a fairly long program, then I decided to compile it to a different directory so I changed the #COMPILE metastatement, but I absent-mindedly typed BAS instead of EXE. So the process of compiling WHATEVER.BAS resulted in the destruction of WHATEVER.BAS, which I reported to R&D, and which the compilers now avoid doing.

    -- Eric

    Leave a comment:


  • Michael Mattias
    replied
    >It would be counterintuitive enough to have a source file named ABC

    But "abc" is easier to pronounce than "PwrDev"

    Leave a comment:


  • Elias Montoya
    replied
    It would be counterintuitive enough to have a source file named ABC.

    Leave a comment:


  • George Bleck
    replied
    Originally posted by Michael Mattias View Post
    potentially exciting
    Well... if you test it by creating a source code file and name it ABC.EXE (instead of ABC.BAS) and try compiling it to ABC.EXE it throws an error 496.

    The compiler locks the source code file so you cannot compile to the same file name as the source file.
    Last edited by George Bleck; 10 Oct 2007, 11:25 AM.

    Leave a comment:


  • Fred H Meier
    replied
    I also create DLL's with different extensions and have to rename. Older versions of PB(6 or 7) would allow for an extension other than DLL.

    Leave a comment:


  • Michael Mattias
    replied
    The example #COMPILE EXE "ABC.BAS" ' Compiles to ABC.EXE seems counter-intuitive, especially applied to DLL's.
    Not only counterintuitive, but if your source code is named ABC.BAS, potentially exciting, too!

    MCM

    Leave a comment:


  • George Bleck
    started a topic Compile metastatement

    Compile metastatement

    Im not sure if this has been addressed in the past (could not find a thread after a short search) but could there be a change to the #COMPILE metastatement to allow an extension to be forced.

    In the examples in the PB Help...

    #COMPILE EXE ' Same name as source, i.e., ABC.EXE
    #COMPILE DLL ' Same name as source, i.e., ABC.DLL
    #COMPILE EXE "ABC" ' Compiles to ABC.EXE
    #COMPILE DLL "ABC" ' Compiles to ABC.DLL
    #COMPILE EXE "ABC.BAS" ' Compiles to ABC.EXE
    The example #COMPILE EXE "ABC.BAS" ' Compiles to ABC.EXE seems counter-intuitive, especially applied to DLL's.

    I am creating two specific types of DLL's for a project I'm working on. One set are enumerated at run time as plug-ins, the others are support DLL's used for common functions. I renamed all the plugin DLL's to PLG but you cannot compile directly to a PLG extension. It always renames to "filename.plg.dll" which I now have to go rename again.
Working...
X