Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXE Errors 1

Status
Not open for further replies.

TNew2Delphi

Programmer
Mar 6, 2005
11
US
Hello All, I'll try to keep this short so if I leave any important information out please tell me what you need. I am an experienced VB programmer but I am new to Delphi. I seem to be getting the hang of it until this error came up. I am using Delphi 2005. I wrote the program using "VCL Forms Application Delphi for NET". It works fine on my machine but when compiled and run on another machine I get the errors "Process ID 856 and Thread ID 1408" and the program will not start. So then I compiled a simple program consisting of only a form and a Label and tried to run that...Same errors came up. But when I compiled the program in "Windows Forms for Net" or "Win32" the program runs fine on other machines. Since the programs run fine on my computer no matter how compiled, I get the idea that I am not installing something on the clients computer. How do I get a simple VCL NET program to run on another computer? Any help will be greatly appreciated and thank you in advance for any replies. Rob.
 
It may be that the "VCL FOrms Application delphi for NET" requires some .NET components on the client machines.

Try installing .NET runtime package for one of the clients and see if it helps. I've only used the demo version of D2K5 so i don't have so much experience about it.

JP
 
Thanks for the reply JP. I had already installed the NET Framework on the Clients Computer Previous to the VCL Progarm and still no luck. I even tried SP1 and ver 2.0 also. Still the same errors. I just noticed the size of the simple form and label exe is only 9k. Is that normal? The VCL libraries themselves are a couple of meg. If I am not compiling the Libraries with the exe, where is the option to do so? I cant find anything that allows me to link or bind the Libraries internally. Thanks again.
 
I think I just answered my own question. I found this blurb in an article...
*************
Reduce the .EXE-size of your app
One default blank form in an application produces the following EXE size:
Delphi 2: 157,184 bytes
Delphi 3: 179,712 bytes
Delphi 4: 282,112 bytes
Delphi 5: 294,912 bytes
Delphi 6: 359,424 bytes
Delphi 7: 368,128 bytes (+134.2% against Delphi 2!!)
Frightening, isn't it? - so, how could you make your EXE files smaller?....
**************

Now my question is How come my exe is so small?. What am I doing wrong? How do I compile the exe WITH the Libraries?

Thanks again to all that reply.
 
Like Pikkunero said, a .NET program requires that the .NET framework (+/- 20Mb) is installed on the client pc. in addition to that it may be required that you must also copy the borland vcl assemblies.

a delphi Win32 application holds all needed libs and is therefore much larger in size. to reduce the size of such a .EXE you'll have to use 3rd party tools luke UPX,

cheers,

Daddy

--------------------------------------
What You See Is What You Get
 
Thanks Daddy. It seems I'm moving in the right direction and at least you gave me some hope. I manually copied the Assemblies...Borland.Vcl.dll, Borland.Delphi.dll, Borland.VclRtl.dll...to the App Folder and Voila...It worked. Thats fine, but I thought Delphi compiled its VCL libraries within the exe. As it works now, it is the same as including the runtime libraries in VB... Which is what I was trying to get away from :(. Is there a compiler option to add the VCL Libraries to the exe in Delphi so I can have a single standalone Exe?
 
No not that I'm aware off,

IMHO you got 3 options here :

1) write a "pure" .NET app (winforms) so that you don't have to include the borland dll's

2) write a VCL .net app, find a way to include the dll's as a resource into your EXE and unpack them at program startup (dont know if this even works)

3) say .NET goodbye and write pure Win32 apps without ever worrying about including some dll's and so on...

--------------------------------------
What You See Is What You Get
 
Thanks Again Daddy, JP... although that is not the answer I wanted to hear. lol. I am in the process of converting code to win32. At least I know where I stand now and what I have to do. I may practice more Net in the future but I need this running now and I dont like WinForms. You just cost me hours of work... Or should I say my own stupidity did. Thx :)
 
Hehe.

Could you please share the solution with us? I might some day start using D2K5 and if i run to a similar problem it would be nice knowing the answer. :)
 
Sigh.. there goes our independency, IMHO Borland missed the boat aboarding this .net hype. The strongest point of Delphi was the exe with almost everything build-in, and working on any windows-os, without sacrifying the speed. TP was once known as one of the fastest compilers on the planet. Thats why they called it Turbo.
Remember the people cracking on the BDE? Good luck with .net.

They try to force us in dll hell, we could start studying VB...

Steven van Els
SAvanEls@cq-link.sr
 
Sorry Pikkunero...But as I see it there is no solution. I just decided to go with option 3 on Daddys list. The take I get on this thread is that if I wanted to use VCL Libraries I have to distribute them with the EXE along with the net framework. As Svanels said, that doesn't seem too independent to me. I think Win32 will be around for a while so I'll just write code in that for now and sit back and wait to see what the next Delphi will do :) This was my stupid mistake for not understanding the VCL Forms and I dont want to blame it on Delphi. Its a shame because I just started using Delphi and I already like the Language and Speed over VB.
 
Ok. Maybe i should've read you previous post more throughly. It does say you're converting to Win32. :)

I love Delphi. Been working with it for years but now it seems that i have to partially start working with VB as well. Which i don't like.
 
I would go with Option 3.

[General .net stuff]
.net doesnt seem like a good idea to me!
Correct me if I am wrong here, but what I understand is that .net achives platform indpendence, by running applications over the internet, if this is correct it seems like a wholey bad idea.





Steve
DNA still on the way, as is the new release of Star do we all like tabs?............
 
I just thought I would share this with you guys. I was tinkering around with my VCL for NET program and found that there IS a way to compile the VCL Libraries within the exe making it a single exe file. In the Project Manager you will see all the DLL's that are needed for the Application. Just right click on the VCL Library that you want to include and check "Link In Delphi Unit". This sets the "Link Units" to True in the Object Inspector. Then just Build the program. I just tried it and the exe worked on a virgin comp with no Delphi Libraries on it. Of course you still need the NET Framework but that is a given. The File Size is 2.1 meg compared to 1 meg for a win32 build. I'm still glad I went the win32 route anyway. It is WAY faster then the VCL wrapper classes for NET. Thanks again and I hope this helps you guys in the future. Rob
 
Thanks TNew2Delphi, [ponder] but now I clearly see the conspiration of Micro$oft, Intell and all the other computer vendors.

What was the average size of a hard drive 5 years ago?

They need to sell the new compuers with 100Gb or more. For work, eople don't stuff their computers full with games, so
they invented .net to make us believe that we desperately need more disk space, computing power and memory.

Steven van Els
SAvanEls@cq-link.sr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top