Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how can i install components with .DCU file?

Posted on 2001-07-14
14
Medium Priority
?
424 Views
Last Modified: 2010-08-05
hello

how can i install components with .DCU file ( not with .PAS file )?
i select MyVCL.dcu in install comp. menu but it makes [fatal error] file not found 'myVcl.pas' and again i wrote this code:

unit MyVCLReg;

interface

uses classes, windows;

procedure Register;

implementation

  uses
    MyVCL;

procedure Register;
begin
 RegisterComponents('Samples', [TMyVCL]);
 // i know the Class Name from Readme.txt file
end;

end.
but it makes that error again!

what can i do? please help me!
thanks
kavmm
0
Comment
Question by:kavmm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +6
14 Comments
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 6282489
listening
0
 
LVL 17

Accepted Solution

by:
inthe earned 620 total points
ID: 6282503
hi,
you can not install a component from dcu that was compiled with different version of delphi than you have as it will just ask you for .pas file as it is now.

only choices you have in this case is to get the .pas file from author or ask for dcu version that is compiled for your version of delphi.
(
or go to www.torry.net etc and search for similar component that does has source code.
)

Regards Barry
0
 
LVL 3

Expert Comment

by:alzv
ID: 6282647
Well.

1. Open Install Component dialog and do all things what are needed
2. When you receive an error message, simply ignore it and close editor with opened binary file without saving
3. Compile and install package. If this DCU file was compiled by the same Delphi version you will have the component installed.

Best regards,
Alexey Zverev.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:sys_integra
ID: 6283004
Perhaps the file MyVcl.dcu is not contained in Delphi Library Path. Verify this. {Sorry my English ...}
0
 

Author Comment

by:kavmm
ID: 6283163
Hello,

Dear sys_integra, I had checked, it was in Library path. I have not any problem with ur English;-)

Good coding

Dear inthe & alzv, I think u are right. It must be compiled in the same ver of Delphi, which I use. It is D5.becouse I could solve this for some other VCLs in .DCU form.

Anyway. MyVCL & TMyVCL just are examples. And I have this problem for some components that I collect them. I searched for some of them for example in www.torry.net ( that is a grate site ). But I did not find.

Are you sure I cannot do anything for this problem?

Best regards
kavmm

0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6283179
Hello,

I think Compiler ver is the point too.But I have a q from sys_integra :

ur member name is 'sys_integra'. Perhaps it is system integrator in complete form. is it related to Automation.

Best regards
hamed
0
 
LVL 2

Expert Comment

by:Ten13
ID: 6285571
Hi kavmm

As allready said: You can only use .dcu files compiled with the same version of Delphi as you use.
When that is said, there is no problem what so ever. Here's a step-by-step:

- Menu: "File"->"New"->"Package"
- Save package (naming it and providing a description)
- Select "Contains" node and press "Add"
- Click "Browse"
- Select "Files of type": "Delphi Compiled Unit (*.dcu)"
- Select .dcu file (component) you want to register
- Click "Open" then "OK" and finally "Install"

That's it! Hope it works for you!

- Martin
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6286050
ten13, this did not solve the problem :-( i guess
0
 
LVL 17

Expert Comment

by:inthe
ID: 6286715
Ten13,
do not propose answers using what others have said !

using the method you provide it will still ask for .pas file.

kavmm,

how do you know the dcu was compiled with same version of delphi as you use?
d5 enterprise ,d5 proffesional or d5 standard ?

any differences and it wont work,nothing you can do about it.

0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6289402
dear kavmm,

If u can find which ver for each .DCU file were Used. i think u can collect them in just one ver by using ActiveX.

for example u found that myvcl is compiled by D3.now if u have D3 and u need this vcl for d5(for example all of ur components are in d5 and u want use just this ver)u can go to D3 and do this:
1. add myvcl.dcu to a library( u can do it becouse it was compiled by this ver)
2. make a activex library
3. make a activex control and set class name to Tmyvcl
4. compile it. now u have a ocx file with Tmyvcl class
5. go to D5
6. go to import activex
7. import it

i could make an ocx file with a .DCU in D5 but my D3 have had some problems from when i install D5( i can not import any activex control to D3).therefor i cant test it .but i think it can work.

dear inthe
is it inportant witch type of D5 is uesd. for example i just have enterprise.is it possible i can not use a component with another type.

best regards
hamed
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6289473
dear  kavmm

if activex solution can work good.then dont worry about the version. send us the .DCU file , everyone could find the compiled ver will make activex for u. i have D2,D3(proffesional),D5(enterprise).

best regards
hamed
0
 

Author Comment

by:kavmm
ID: 6308365
Ten13 ,I am agree with kretzschmar and inthe .But h_mohsenian , when I want to make the ActiveX Control the component is not in the combobox component list.
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8703100
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept inthe's comment as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question