C Board  

Go Back   C Board > Platform Specific Boards > Windows Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 09-26-2001, 11:47 AM   #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?
swed is offline   Reply With Quote
Old 09-26-2001, 05:46 PM   #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.
The V. is offline   Reply With Quote
Old 09-27-2001, 11:40 AM   #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.
swed is offline   Reply With Quote
Old 09-27-2001, 12:12 PM   #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.
The V. is offline   Reply With Quote
Old 09-29-2001, 04:03 AM   #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
swed is offline   Reply With Quote
Old 10-01-2001, 11:17 AM   #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
swed is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ping and Traceroute not working in IPv6 environment on Windows XP / Win Server 2003 vigneshp Networking/Device Communication 8 05-07-2009 11:31 AM
Implementing portable user thread API to embedded microcontroller application draggy C Programming 4 07-10-2005 02:01 PM
help with this tyrantil C Programming 18 01-30-2005 04:53 PM
Application Utilization on Win PC compiler Tech Board 1 07-23-2003 04:39 AM
Can I get this to loop back? Unregistered C Programming 9 05-07-2002 03:34 AM


All times are GMT -6. The time now is 05:43 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

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