Why does the IDE not find everything it needs in my package?

Colleagues,

I used to be very comfortable writing and installing components in D7 but am having a problem in XE-5 Professional. I'll outline clearly as possible.

1 -  I have a source library (let's call it "MySRC" in which I have developed an extensive vector graphing component (TCustomControl) named "vGraph.pas". It USES four other units (Unit1.pas ... etc.). Being a visual component it is visible on  hosting application form at design time where you can resize the canvas area and initialize the numerous properties affecting graph appearance. (This is solid code and working for over a decade.)

To bring this all into the XE-5 "Pro" world here are my steps:

2 - Create my own package named "STR" and for purposes of backup/editing, save it in folder "\MyPackages". This goes just fine. I see a .dpk and a .bpl after Build.

3 - Install the empty package to the IDE just to see how the process goes. I now get a tab up top saying "STR". Good, but the name it gets on the "Install Packages" window is the *path* to STR (in text form), not it's actual name "STR", which seems odd. Anyway, I press on.  (BTW - I get same results if I populate the package with a component before installing the package).

4 - I now ADD my component unit "vGraph.pas" to this "STR" package and in Project Options for the package point the search path to "MySRC" so Compile/Build can find those additional 4 units "vGraph" will want to use. Note that "vGraph.pas" has the "Register" procedure naming "STR" as target package.

5 - Compile to check things and then do a Build. There are zero errors but four Warnings identifying each of the additional units as "Implicitly Imported". This seems normal - informative and of no concern.

6 - Check the package and see the vGraph icon there. I re-install the package to the IDE to make sure everything is really there.

7 - Click the STR tab on the IDE toolbar and sure enough, vGraph component is there.

8 - Now I define a "TEST" project of type "VCL forms". I drop the vGraph component onto the form and a graph appears. I can re-size, reposition and edit values for all 40 - 50 properties and watch them change on the graph in real time. Nice. Just how it should be. Design phase is flawless.

9 - Now for trouble. I click "Run". Compilation fails with a message "vGraph.dcu" cannot be found in "C:\Users\MyName\Documents\RAD Studio\Projects".   Huh? Why is it looking there? My understanding was that an installed component is self-contained sort of like a DLL. Everything should be in there. No matter how I rebuild the package or fiddle with search paths I cannot get the IDE to do anything else. Compile fails.

In search for clues I try this ... In test project "TEST" I edit Project Options to make a search path to my source Library "MySRC" which is where all units for the component are located. The compile now works and the test is 100% successful. Zero errors and no warnings. The graph works perfectly on the form and I have an application .exe..

This is OK as a temporary workaround but what if I create an application where I use 5 or 6 of my components? That's a lot of search paths to supply and clearly not the way this should work. If I drop a component on a form I expect it to become part of the app with everything it needs already there.

I welcome suggestions, fully expecting I have overlooked the obvious :~

best wishes,
gk
0
Garth
2/1/2014 8:25:16 PM
public.delphi.vcl.writing 510 articles. 0 followers. Follow

4 Replies
892 Views

Similar Articles

[PageSpeed] 51

Garth Klatt wrote:
> 9 - Now for trouble. I click "Run". Compilation fails with a message "vGraph.dcu" cannot be found in "C:\Users\MyName\Documents\RAD Studio\Projects".   Huh? Why is it looking there? My understanding was that an installed component is self-contained sort of like a DLL. Everything should be in there. No matter how I rebuild the package or fiddle with search paths I cannot get the IDE to do anything else. Compile fails.
> 

You do not have run time packages checked and if checked your runtime package is 
not in the list of them so it is trying to statically linking the dcu in.  For 
it to find it the location of your dcu needs to be in the library path (library 
path is for binaries, do not put the source path there).

> In search for clues I try this ... In test project "TEST" I edit Project Options to make a search path to my source Library "MySRC" which is where all units for the component are located. The compile now works and the test is 100% successful. Zero errors and no warnings. The graph works perfectly on the form and I have an application .exe..
> 

Do not put the source paths into the library path, your binaries belong in their 
own directories separated by platform.  That is the directory you put in the 
library path.

> This is OK as a temporary workaround but what if I create an application where I use 5 or 6 of my components? That's a lot of search paths to supply and clearly not the way this should work. If I drop a component on a form I expect it to become part of the app with everything it needs already there.
> 

You should have a common location for your binary outputs and put that common 
location in your global library path for each platform you support.

> I welcome suggestions, fully expecting I have overlooked the obvious :~
> 
> best wishes,
> gk


-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
2/1/2014 8:30:54 PM
Hi Jeff ... some small success ...

Thanks for the response. I mostly have what you recommend in terms of file organization with one exception that's now changed.

You were right, "Compile with runtime libraries" was not checked. So I did that but then, no matter what program I tried to compile there was failure with this message:

E2202 - Required package 'DataSnapCommon' not found. 
--------------------------------------
With experimentation discovered the unfound package name can safely be deleted from the runtime list. That got rid of above problem but then the IDE still could not find required references in the package even though I see it in the list of packages. I can get the application to compile with the component but like before, only by pointing to the folder of dcu's in my own library. It's as if the runtime isn't there(???) even though the package installer list shows it present and with the component in there
.

Will fiddle with some more things later today.

This just in ... I may have it working. There's an excellent site going into details and pitfalls of packages and components:

http://mc-computing.com/languages/delphi/Packages.html 

I went step by step and got a clean compile without any need for custom paths to my own libraries.

Quite frankly, there's a lot of confusion on the subject but the site mentioned is a big help. I'll mark this solved tomorrow if more tests look good.


best wishes,
gk





> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
> Garth Klatt wrote:
> > 9 - Now for trouble. I click "Run". Compilation fails with a message "vGraph.dcu" cannot be found in "C:\Users\MyName\Documents\RAD Studio\Projects".   Huh? Why is it looking there? My understanding was that an installed component is self-contained sort of like a DLL. Everything should be in there. No matter how I rebuild the package or fiddle with search paths I cannot get the IDE to do anything else. Compile fails.
> > 
> 
> You do not have run time packages checked and if checked your runtime package is 
> not in the list of them so it is trying to statically linking the dcu in.  For 
> it to find it the location of your dcu needs to be in the library path (library 
> path is for binaries, do not put the source path there).
> 
> > In search for clues I try this ... In test project "TEST" I edit Project Options to make a search path to my source Library "MySRC" which is where all units for the component are located. The compile now works and the test is 100% successful. Zero errors and no warnings. The graph works perfectly on the form and I have an application .exe..
> > 
> 
> Do not put the source paths into the library path, your binaries belong in their 
> own directories separated by platform.  That is the directory you put in the 
> library path.
> 
> > This is OK as a temporary workaround but what if I create an application where I use 5 or 6 of my components? That's a lot of search paths to supply and clearly not the way this should work. If I drop a component on a form I expect it to become part of the app with everything it needs already there.
> > 
> 
> You should have a common location for your binary outputs and put that common 
> location in your global library path for each platform you support.
> 
> > I welcome suggestions, fully expecting I have overlooked the obvious :~
> > 
> > best wishes,
> > gk
> 
> 
> -- 
> Jeff Overcash (TeamB)
>        (Please do not email me directly unless  asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted  corridors of Whitehall.
>               (Fish)

Edited by: Garth Klatt on Feb 2, 2014 9:26 AM

Edited by: Garth Klatt on Feb 2, 2014 9:45 AM

Edited by: Garth Klatt on Feb 2, 2014 10:55 AM

Edited by: Garth Klatt on Feb 2, 2014 2:44 PM
0
Garth
2/2/2014 10:48:38 PM
Garth Klatt wrote:
> Hi Jeff ... some small success ...
> 
> Thanks for the response. I mostly have what you recommend in terms of file organization with one exception that's now changed.
> 
> You were right, "Compile with runtime libraries" was not checked. So I did that but then, no matter what program I tried to compile there was failure with this message:
> 
> E2202 - Required package 'DataSnapCommon' not found. 
> --------------------------------------
> With experimentation discovered the unfound package name can safely be deleted from the runtime list. That got rid of above problem but then the IDE still could not find required references in the package even though I see it in the list of packages. I can get the application to compile with the component but like before, only by pointing to the folder of dcu's in my own library. It's as if the runtime isn't there(???) even though the package installer list shows it present and with the component in the
re

You will sometimes find that ahppening when packages are removed when upgrading 
a project from one version to the next.  A unit is moved between packages or a 
package is just removed.

Your other problem of not finding it is the dcp file must be in your library 
path for the package.  Also if you have resources in your package like dfm's 
then they belong in that directory too.

If this is a run time error, the .bpl must be in the OS loading logic path. 
Unchanged the default is basically the working directory.  <windows>, 
<windows\system32> and finally the OS path.  Note that in 64 bit windows 
systme32 is for 64 bit dlls and SysWOW64 is for 32 bit dlls.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
2/3/2014 3:41:58 AM
OK. Think I am in business. I recall having trouble like this over 10 years ago with D7. IMHO the package feature, while extremely useful, was not well designed in the first place and we (meaning also Embarcadero) are now stuck with it. There is a house-of-cards feel to it and despite the wizards it's not very intuitive. I am presently putting together my own web page in step-by-step fashion in case I have to re-educate myself yet again some day.

One other thing I note. In the application project/options/runtime packages it was necessary not only to remove the Datasnapcommon item but to manually insert the name of my package (which you rightly suspected might be another problem). The best way was to copy the whole colossal mess to Clipboard, edit in my text editor and then paste it all back (then keep a copy for other projects). You have to uncheck the inherit box or when you exit that panel the unedited packages list is restored. At least the pro
ject Save keeps it all.

Your information got me going in the right direction and ultimately led to success. I appreciate your patience and expertise in dealing with this. Apart from getting things working, the upside is I learned a lot.

Best wishes,
gk


> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
> Garth Klatt wrote:
> > Hi Jeff ... some small success ...
> > 
> > Thanks for the response. I mostly have what you recommend in terms of file organization with one exception that's now changed.
> > 
> > You were right, "Compile with runtime libraries" was not checked. So I did that but then, no matter what program I tried to compile there was failure with this message:
> > 
> > E2202 - Required package 'DataSnapCommon' not found. 
> > --------------------------------------
> > With experimentation discovered the unfound package name can safely be deleted from the runtime list. That got rid of above problem but then the IDE still could not find required references in the package even though I see it in the list of packages. I can get the application to compile with the component but like before, only by pointing to the folder of dcu's in my own library. It's as if the runtime isn't there(???) even though the package installer list shows it present and with the component in t
here
> 
> You will sometimes find that ahppening when packages are removed when upgrading 
> a project from one version to the next.  A unit is moved between packages or a 
> package is just removed.
> 
> Your other problem of not finding it is the dcp file must be in your library 
> path for the package.  Also if you have resources in your package like dfm's 
> then they belong in that directory too.
> 
> If this is a run time error, the .bpl must be in the OS loading logic path. 
> Unchanged the default is basically the working directory.  <windows>, 
> <windows\system32> and finally the OS path.  Note that in 64 bit windows 
> systme32 is for 64 bit dlls and SysWOW64 is for 32 bit dlls.
> 
> -- 
> Jeff Overcash (TeamB)
>        (Please do not email me directly unless  asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted  corridors of Whitehall.
>               (Fish)
0
Garth
2/3/2014 5:32:44 PM
Reply:

Similar Artilces:

Where do I find the component of a package in BDS2006(Delphi) IDE?
I have installed a graphics package (VTK) in BDS2006 C++ personality. It can be used in C++ projects, but now I am dealing with a Delphi project... When I start the Delphi32 personality and move to the Components->Install page I can see this package listed and checked and if I use the components button I see the TvtkBorlandRenderWindow component (this is the single component of this package). So far all is OK, but now I want to drop this component on a Delphi form but I cannot find it in the components list... According to the vtkBorlandRenderWindow.cpp file it should be regis...

Delphi 6 to Delphi XE2: can't find required package.
We have a Delphi 6 Project Group that we like to work on in Delphi XE2. When trying to build the project, we get the DCC Fatal Error E2202: Required package 'cds' not found. With Delphi 6 we've used the following tools: - JVCL340 & JCL221 - devExpress QuantumGrid 6 - QuickReport (default in Delphi 6) - Visoco Sybase Driver, Devart Oracle en MSSQL drivers With Delphi XE2 (update 3 installed) we're using the following tools and settings for now (after removing Delphi 6 in an attempt to make it work) : - JVCL345 & JCL231 (http://jvcl.delphi-jedi.org/) - devExpr...

Delphi 2010 IDE throws error on "find" and "find in files"
I will greatly appreciate any advice how to cure the suddenly appeared misbehaviour: I just loaded the main project file and then tried to find code snippets fore re-use with "find" and "find in files" the Eurekalog extract is: 2.2 Address : 20EB30B6 2.3 Module Name : vclide140.bpl - (Integrated Development Environment Specific Components) 2.4 Module Version: 14.0.3593.25826 2.5 Type : EOutOfResources 2.6 Message : Unable to insert a line. 2.7 ID : 61FB 2.8 Count : 1 2.9 Status ...

Write plugin for Delphi IDE [Edit]
Hi. Is there tutorial how to write plugin for IDE (for example Delphi XE) ? I'd like to write plugin to extend menu strip and context menu (right click mouse menu) to do some actions at editor code. Edited by: Tomasz Maciejewski on Aug 12, 2012 2:52 AM Tomasz Maciejewski wrote: > Hi. Is there tutorial how to write plugin for IDE (for example Delphi > XE) ? Not for XE (where OTA was noticeably expanded) but Experts and Wizards in Delphi http://delphi.about.com/od/objectpascalide/a/wizardsexperts.htm Erik’s Open Tools API FAQ http://www.gexperts.org/open-tools-api-...

How to change line when writing a new thread from withing Delphi IDE.
Hello, Maybe, I missed something but, I cannot make a new line when I type a new post from this forum from inside Delphi 2010. Is there an option somewhere I didn't see? Martin. Martin Pelletier wrote: >Maybe, I missed something but, I cannot make a new line when I type a new >post from this forum from inside Delphi 2010. > Hm, indeed that doesn't work. >Is there an option somewhere I didn't see? No that I know of. It is already reported to QC, see following related report: Report No: 43054 (RAID: 248687) Status: Open Welcome Page...

need help writing regex to find whitespaces in HREF attribute
Let's me first say that I really suck at regular expressions despite all my efforts to try and learn it by myself.  Here's what I'm trying to do... I have a bunch of HTML code which I want to search for any href="<whatever>" sections but ONLY where there are whitespaces.  So for example, href="/someStuff/test file with space.pdf" .I found the following example by .NET documentation which will locate all ocurrences of href="..." but I'm not sure how to modify it to look for whitespaces anywhere between the quotes:Regex r = new Rege...

XE2 fresh install: Unable to find package import: vcl.bpi
This seems a little bit kafkian. Not by this error but for all stupid errors last C++ Builder versions have. RAD Studio XE2 just installed with Update pack 2. A VCL project. None added except the project is saved. On compile, first I get the vcl.bpi error and then rtl.bpi fault one. Those files are in Release lib/win32 folder but not in debug one. Is it safe to copy release into debug? A known bug? -- Release build have the same problem. On Mon, 28 Nov 2011 20:05:09 +0100, Rafael Ontivero <no@mail.com> wrote: > This seems a little bit kafkian. Not by thi...

ANN: Gnostice XtremePDFConverter VCL 3 Released with support for more Delphi IDEs
Gnostice XtremePDFConverter VCL 3 Released --- We are happy to announce the immediate availability of XtremePDFConverter VCL for Delphi 7, Delphi 2007, Delphi 2009 and Delphi 2010. XtremePDFConverter VCL is a powerful VCL component for intelligently converting PDF to easily editable Word RTF documents with support for recognition of paragraphs, tables, newspaper-style columns, paragraph alignment, bulleted and numbered list and much more. Gnostice customers with an active license of XtremeDevSystem VCL Universal Subscription get XtremePDFConverter VCL with source totally free....

Can't find NetBeans IDE package in OpenSuse 12.1 repos
Hi, I was previously developing in NetBeans in OpenSuse 11.3 & 4, but when I upgraded to OpenSuse 12.1 recently, I can no longer find the "netbeans" package within the provided repositories. I tried a bit of detective work, comparing repos where this package used to be in OS11.3, to see if it they are in the equivalent repo for OS12.1, but haven't had any luck so far. In OS11.3, the "netbeans" package was available in: - *download.opensuse.org/repositories/Java:/packages/openSUSE_11.3/* (noarch/netbeans-6.8-16.6.noarch.rpm) - There is an eq...

VS ide / delphi ide key map
I'm quit lost in VS ide, F9 run, F8 / F7 Ctrl+Alt+P for tool pallet and the fast find when you type component name F11 to switch to code view / object inspector, the ability to navigate in the object inspector with tab and writing property name. Will someone make a Delphi to VS guide? -- Henning Swiboda wrote: > I'm quit lost in VS ide, F9 run, F8 / F7 > Ctrl+Alt+P for tool pallet and the fast find when you type component > name > F11 to switch to code view / object inspector, the ability to navigate > in the object inspector with tab and writing propert...

package conversion from Delphi 5 to Delphi 2010
Hello, I am evaluating 2010 to convert a delphi 5 app up. My first task is to convert some custom control packages. My requires statment looks like this: requires vcl50, Vclx50, VclSmp50, Vcldb50, vcljpg50, What are the delphi 2010 equivalents if any? Is there documentation that I could look at to help with the conversion process? Thanks.. ...Joe.. joe alaimo wrote: > requires > vcl50, > Vclx50, > VclSmp50, > Vcldb50, > vcljpg50, 140 is the 2010 version. > > What are the delphi 2010 equivalents if any? Is t...

Need help finding host to fit needs
I have a website that I expect to need 1.) a lot of bandwidth and 2.) disk space. My site serves up large images so I'm looking for a good reliable host that's cost effective. Does anyone have any recommendations? I'm with DiscountASP right now and so far so good, but there bandwidth/space upgrades seem limited. Thanks. Hello, What are your requirements for bandwidth and disk space? RegardsWindows Hosting ASP.NET | Top ASP.NET Hosts | Dedicated Windows Hosting 8bit:I have a website that I expect to need 1.) a lot of bandwidth and 2.) disk space. My site serves up larg...

NFS: client needs to write twice (!) for a successful write
Hello, I was looking for a couple of days for a solution, so (I think) I have the basics sorted out - i.e. correct /etc/exports, correct mount, no firewall, matching UIDs/GUIs, correct squash-ing etc. The (weird) problem: a server (an Intel SS4200) exports an NFS share mapped by an 11.1 client (tried both YaST-way and CLI-way on the client). I can access and read from the share. However, when trying to write to the share (a simple 'cp') I observe the following behavior: - The first time the 'cp' command is issued, it ends up with: cp: cannot create regular file `...

Delphi 2006 vs Delphi 2009 IDE stability
Hello, all. I have medium sized project which includes about 20Mb of source code (just size of *.pas files). I use Delphi 2006. There are third party component suites JVCL, DevExpress Bars, Pegasus Imaging. All updates applied. The main problem is IDE stability. About four..five times a day IDE become unstable after intensive usage of code insight functions (most often I press Ctrl+Space key). The best outcome is that I have to save everything and restart the IDE. The worst outcome is when IDE stalls or falls into endless loop of error messages and any unsaved work is lost. OS...

Web resources about - Why does the IDE not find everything it needs in my package? - public.delphi.vcl.writing

An Incomplete Catalog of Donald Trump's Never-Ending Fabrications
There's a legal term applied to advertising called "puffery." For example, if Coca-Cola says that Coke is the best tasting soda in the world, ...

Pastor Calls Victims of Paris Attacks 'Devil Worshippers'
Kevin Swanson, the anti-gay, right-wing pastor who hosted the very strange National Religious Liberties Conference earlier this month, commented ...

‘Star Wars: The Force Awakens’ Spoilers: Mark Hamill Reveals Gigantic Reason For Growing Out His Beard ...
It was confirmed that Mark Hamill would be returning to the world of Star Wars along with Harrison Ford and Carrie Fisher. That much is known, ...

Monday Night Raw Results: November 23
Monday Night Raw results are in, and it looks like a new stable is being formed, according to WWE. Roman Reigns demands rematch Since he lost ...

Chicago Police Leader: Fire Officer Who Killed Unarmed Woman
Chicago police superintendent recommends firing officer who fatally shot unarmed woman

Apple plans Apple Pay for China by February, says WSJ
Apple has struck deals with China's four main state-run banks in an effort to bring Apple Pay to the country, according to a report in The Wall ...

ACLU sues Indiana governor over refusal to resettle Syrian refugees
Pence is one of more than 25 U.S. governors, mostly Republicans, who have publicly called on President Barack Obama to stop resettling Syrian ...

FAA publishes drone registration recommendations: You must be 13 to enter
The Federal Aviation Administration has released a task force’s recommendations for setting up a registration system for recreational drones ...

Futurama is coming back as a mobile game
After being canceled, resurrected, and canceled again, Futurama is coming back — this time as a mobile game. Matt Groening's sci-fi cartoon universe ...

Windows 10’s fall update is deleting certain apps without asking
Windows 10 is possibly making unwanted changes to your gaming rig. Microsoft’s first big update for its operating-system-as-a-service is deleting ...

Resources last updated: 11/24/2015 6:57:32 AM