How do I fix this annoyance?

Whenever I install a new component, I get the message...

Unit ..... is implicitly imported into .....

What can I do to get rid of this?

Thanks,

John.
LVL 6
JaymolAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ThaddyCommented:
You can Explicitly import the unit!
I wouldn't bother, the message just indicates a dependancy
0
LischkeCommented:
Jaymol, this warning is shown because you cannot include a unit in a package if it is already included in another one. This holds also true for implicitly imported units. But if the unit in question is not explicitly imported then you may have a hard time to find out why you cannot import it into another package. Hence this warning is shown to remind you to take the unit into the package to see from the file list which unit is already there.

Generally (hint also for Thaddy), don't ignore warnings or even hints from the compiler. They make to 99% sense and saved me often hours of work to find bugs!

Ciao, Mike
0
JaymolAuthor Commented:
Sorry Thaddy, but like I said, I want to get rid of this.  I need to know how.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

LischkeCommented:
John,

the solution is to open the package in Delphi. Then click Add in the package window and select the unit(s) in question. After pressing ok they should now appear in the list of files in the package. Compile the package now...

Ciao, Mike
0
JaymolAuthor Commented:
Mike : That's the way I add units/components, but when I compile the package I get the warnings.  I know they don't stop the code working, but I'd love to be able to click the compile button and not be shown any warnings!

John.
0
LischkeCommented:
So you don't want to include the units into your package but still compile without warnings? Why? There's no harm to do this and you cannot switch off the warnings as in C/C++. Hence either you ignore them or you include the units.

Ciao, Mike
0
JaymolAuthor Commented:
How would I include the units to get rid of these warnings then?
0
LischkeCommented:
Somehow I got the impression we are talking different lines :-) So here again the problem and my suggestion:

1) you have a package that you want to isntall (that is, a *.dpk file and some accompanying units)
2) you open the dpk file in Delphi and press Compile
3) you get the warnings about implicitly imported units

So far the problem, now my solution:

1) look at the warnings list to know which units are implicitly imported
2) add these units also to the package the usual way
3) now press again Compile
4) the warnings should now disappear

Ciao, Mike
0
philipleighsCommented:
Isn't that what Thaddy said?

"Explicitly import the unit!"
0
LischkeCommented:
Yes :-) but he also mentioned to ignore the warning. So (despite the fact that I made the discussion here) Thaddy should get the points for first mentioning the solution...

Ciao, Mike
0
JaymolAuthor Commented:
Thaddy....post something for the points.  (Sorry it's been so long!)
0
LischkeCommented:
just use "accept comment as answer" so you don't need to wait for an answere to be proposed...

Ciao, Mike
0
JaymolAuthor Commented:
Lischke : I can't do that because the only thing on this page that Thaddy posted was a rejected answer.  I need another comment or answer to give him the points.
0
LischkeCommented:
Well, if Thaddy isn't interested...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JaymolAuthor Commented:
Yeah.  Go on then.  Just remember this Mike. (I even rated it as excellent! ;-)
0
LischkeCommented:
:-)=  thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.