Win application not very portable

This is a discussion on Win application not very portable within the Windows Programming forums, part of the Platform Specific Boards category; I have a simple windows application built with Borland 4.52 using C++. When I try to run try to run ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4

    Angry Win application not very portable

    I have a simple windows application built with Borland 4.52 using C++. When I try to run try to run the application on other PC's it won't run as some files are missing, the files are different depending on which type of application I build ie WIN32, Win3.1
    the files are all .dll files and all can be found in the BC45\BIN folder

    Can I build my application so that it will run without these files, or will I have to include them in the folder along with my program?

    I have tried recompiling it as with lots of different settings in the build options but it always fails to run for the same reason.

    the application works fine on my PC as the files are all present.

    Any help to keep me sane?

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    1) Under compiler options, select static linking. I don't have that ver of the compiler, but I am sure that's the setting you need.

    Now, if it works like Borland C++ 5, it doesn't *quite* statically link your app -- it will still require DLLs, but the main libraries will be linked in your EXE itself.

    2) You can verify which DLLs, if any, your program needs with a tool like Dependency walker:

    http://www.dependencywalker.com/

    Usually, an app developed and statically linked will need standard windows DLLs, and BWCC.DLL, which is the Borland Windows Common Control DLL.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    4
    Thanks

    I'll give it a try, although at first look I can't see anywhere to change to static linking, there is plenty about it in the help files but in the options/project menu there is no mention of it.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Well, is there a "target expert" like with BC5?

    In BC5, you right click on the .EXE node in the project window, and select "target expert", where you can set what kind of target (windows GUI, windows console, DOS console), and there, you set static or dynamic linking.

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    4

    i'll give it a try

    Thanks

    I have mananged to get a list of the dll's it uses to run using dependency walker and it's only 3 files so it's not as bad as I first thought. I would rather link them to the exe though so I will give your latest post a try

    thanks

    Ed

  6. #6
    Registered User
    Join Date
    Sep 2001
    Posts
    4

    Talking thanks, but one more thing

    Thanks for the help with the static linking, it works!!!!
    But can I ask another newbie question?
    My next problem is using bitmaps in the dialog. When I add bitmaps to the dialog the program will only runwith the compiler present. If I try to run it without the compiler i get a Unhandled exception message - "Exception #32747(no message available)"
    I have tried different targets and build attributes using the BCWW library but to no avail

    Any Help would be great

    Thanks

    Ed

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 05-07-2009, 12:31 PM
  2. Replies: 4
    Last Post: 07-10-2005, 03:01 PM
  3. help with this
    By tyrantil in forum C Programming
    Replies: 18
    Last Post: 01-30-2005, 04:53 PM
  4. Application Utilization on Win PC
    By compiler in forum Tech Board
    Replies: 1
    Last Post: 07-23-2003, 05:39 AM
  5. Can I get this to loop back?
    By Unregistered in forum C Programming
    Replies: 9
    Last Post: 05-07-2002, 04:34 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21