Announcement

Collapse
No announcement yet.

Compile a dll to a specific folder

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

    Compile a dll to a specific folder

    Sorry gang, so many questions so little play time!

    how do i do this:

    #COMPILE DLL "C:\Program Files\Omega Research\Program\MyNew.DLL"

    I just get "Destination file write error"

    ------------------
    Kind Regards
    Mike

    #2
    You don't do that.
    PB Compiler does not understand "LongFileNames"
    Actually there are 2 problems with your path.
    1) as above (LFN-problem)
    2) calling most API-functions using "pretty" LFN,
    ie there is a space in the path, must be called
    with quotes surrounding the LFN

    ------------------
    Fred
    mailto:[email protected][email protected]</A>
    http://www.oxenby.se

    Fred
    mailto:[email protected][email protected]</A>
    http://www.oxenby.se

    Comment


      #3
      Mike,

      Whenever I get that error message, it's usually because there is
      an instance of the .EXE running in memory (probably becuase the
      last time I tested it, it didn't stop like I thought it should).

      You might try verifying that the DLL is not currently present in
      memory.

      You can abbreviate the LFNs with ~1....



      ------------------
      Bernard Ertl
      Bernard Ertl
      InterPlan Systems

      Comment


        #4
        Wow, can I do this?

        #Compile DLL "C:\WINDOWS\SYSTEM\CCSDATE.DLL"


        ??
        That makes organization a lot easier, so long as I know nothing has the DLL open...
        I have to admit I'd never thought of doing something so simple....



        ------------------
        Scott
        Scott Turchin
        MCSE, MCP+I
        http://www.tngbbs.com
        ----------------------
        True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

        Comment


          #5
          Scott --

          Yes you can. I won't go into the dangers and "evils" of placing DLLs in the system directory, but somebody probably will. It's really best to put DLLs in the app's default directory.

          -- Eric


          ------------------
          Perfect Sync Development Tools
          Perfect Sync Web Site
          Contact Us: mailto:[email protected][email protected]</A>



          [This message has been edited by Eric Pearson (edited April 06, 2001).]
          "Not my circus, not my monkeys."

          Comment


            #6
            Fred,

            I can compile it to
            "C:\Testing\Test.dll"

            fine. But as you say the Long File Name problem crops up with my original destination

            (No the dll is not being used when I try to save it)

            So whats the workaround / creative solution to getting my compiled Dll into the folder I want it in to save me dragging and dropping it everytime I re-compile it.

            ( There are hundreds of files in that folder so do not want to move all my .bas files there. they will get lost)

            ------------------
            Kind Regards
            Mike

            Comment


              #7
              Mike --

              Figure out the short path name to your destination, and use that. Like...

              Code:
              #COMPILE DLL "C:\PROGRA~1\OMEGA~1\PROGRAM\MyNew.DLL"
              "Program Files" is almost always PROGRA~1 but you would need to figure out the short name for "Omega Research". At a command prompt, you can use DIR /X to see the short names of directories and files.

              -- Eric

              ------------------
              Perfect Sync Development Tools
              Perfect Sync Web Site
              Contact Us: mailto:[email protected][email protected]</A>
              "Not my circus, not my monkeys."

              Comment


                #8
                Eric:
                OK now i get it.
                How do you figure out a short file name?

                (PB did not like your guess )

                and how long is a short file name anyway? is it the old DOS 6 chars max ?

                ------------------
                Kind Regards
                Mike

                Comment


                  #9
                  I dont have /X in win98SE for some reason, but after a little trial and error I found "command" which gave me a DOS prompt (urgh the nighmares returned)

                  After a while the old CD.. and CD /PROGRA~1 commands returned from deeeeeeeep down in a dark place!

                  anyways I figured it out thx Eric

                  the solution is:
                  #COMPILE DLL "C:\PROGRA~1\OMEGAR~1\PROGRAM\MyNew.DLL"


                  ------------------
                  Kind Regards
                  Mike

                  Comment


                    #10
                    > I dont have /X in win98SE for some reason

                    Right, I forgot that that's an NT thing. On 9x you can use DIR /V for the "Verbose" mode, and it will list the long and short names for everything.

                    -- Eric


                    ------------------
                    Perfect Sync Development Tools
                    Perfect Sync Web Site
                    Contact Us: mailto:[email protected][email protected]</A>
                    "Not my circus, not my monkeys."

                    Comment


                      #11
                      Ya, understood about the system directory, I only put them in there until testing because a lot of times I don't want to path everyth ing out...
                      But after an app is done or going into beta then I remove them, place them in an app directory and run the app from there vs from the IDE...



                      ------------------
                      Scott
                      Scott Turchin
                      MCSE, MCP+I
                      http://www.tngbbs.com
                      ----------------------
                      True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                      Comment


                        #12
                        I see quite a few folks compile directly to the desktop folder so they can directly test an app, say for Drag & Drop, etc.



                        ------------------
                        Lance
                        PowerBASIC Support
                        mailto:[email protected][email protected]</A>
                        Lance
                        mailto:[email protected]

                        Comment


                          #13
                          I also do this which nobody mentioned:

                          #COMPILE DLL "\\es_127\c_drive$\myapp\my.dll"

                          Of course it complains when I am off the network.
                          Its great for testing on remote machines.

                          Cheers

                          Michael

                          ------------------

                          Comment


                            #14
                            That is a neat trick Michael... Great lateral thinking...!

                            ------------------
                            Lance
                            PowerBASIC Support
                            mailto:[email protected][email protected]</A>
                            Lance
                            mailto:[email protected]

                            Comment

                            Working...
                            X
                            😀
                            🥰
                            🤢
                            😎
                            😡
                            👍
                            👎