Thread: Linker Option?????

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    184

    Linker Option?????

    Hello everyone,

    I have a complicated question here. I'm not even sure how to phrase it but I will do the best that I can. We have just finished converting a medical records system written in DJGPP C to DEV C++. Now previously in DJGPP when there were updates made to the executeable, we could just replace it no matter if there was anybody using the program at the time or not. It would replace and the new version would take effect when the user logged out and back in to the program. Now, everyone has to get completely out of the program before the executeable can be replaced. We have tried the different linker commands, but nothing is able to make it possible. For all I know it might not be possible with DEV. I just figured I would ask. Any ideas??????

    Thanks,
    Kendal

  2. #2
    Master of the Universe! velius's Avatar
    Join Date
    Sep 2003
    Posts
    219
    That is odd. When a program is running Windows will lock the exe file from being modified in 'normal' conventions. That is viruses use a different method to write to exe files that have been locked from writing. Otherwise I don't know of a compiler switch that could allow you to do that.
    While you're breakin' down my back n'
    I been rackin' out my brain
    It don't matter how we make it
    'Cause it always ends the same
    You can push it for more mileage
    But your flaps r' wearin' thin
    And I could sleep on it 'til mornin'
    But this nightmare never ends
    Don't forget to call my lawyers
    With ridiculous demands
    An you can take the pity so far
    But it's more than I can stand
    'Cause this couchtrip's gettin' older
    Tell me how long has it been
    'Cause 5 years is forever
    An you haven't grown up yet
    -- You Could Be Mine - Guns N' Roses

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    What's the difference between "get completely out of the program" and "logged out and back in to the program"?

    You were probably able to update the exe because the Windows VDM was running it and not the OS.

    VDM = Virtual Dos Machine - yep.

    Set it up so that users will start the application via a proxy application or batch file. The proxy app will look for "mrs.exe.new", copy it to "mrs.exe", then start "mrs.exe".

    gg

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    Originally posted by Codeplug
    What's the difference between "get completely out of the program" and "logged out and back in to the program"?

    You were probably able to update the exe because the Windows VDM was running it and not the OS.

    VDM = Virtual Dos Machine - yep.

    Set it up so that users will start the application via a proxy application or batch file. The proxy app will look for "mrs.exe.new", copy it to "mrs.exe", then start "mrs.exe".

    gg
    To elaborate on this, it worked under DJGPP because it was compiled as a DOS program. Dev-C++ compiles it as a windows console program. You can delete the DOS program as it "runs", because it is being loaded and interpreted by the DOS emulator, so the executing program (the DOS emulator itself) is not deleted.

    A console program, on the other hand, cannot be deleted while running, because the program itself is executing.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  5. #5
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    Thank you very much. That answers my question. I was not sure if it was a linker option or not, but now I know. I greatly appreciate it.

    Thanks again,
    Kendal

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 12-06-2008, 07:54 PM
  2. Linker errors in VC++ 2005
    By C+/- in forum C++ Programming
    Replies: 0
    Last Post: 05-18-2007, 07:42 AM
  3. VS2005 linker option .reloc
    By cloudy in forum Windows Programming
    Replies: 0
    Last Post: 06-26-2006, 10:47 AM
  4. Binary Search Tree
    By penance in forum C Programming
    Replies: 4
    Last Post: 08-05-2005, 05:35 PM
  5. Compile with *.lib
    By Kelvin in forum C++ Programming
    Replies: 1
    Last Post: 07-23-2002, 06:24 PM