Help required with (D5) build/compile problem.

dsr_at_cix.compulink.co.uk
Date: 03/22/05


Date: Tue, 22 Mar 2005 14:02:26 +0000 (UTC)

I've got this problem that I don't understand and wondered if anyone could
throw some light on to what might be happening.

Although I'm describing this with an image control, you don't need to know
anything about images or this control to help me.

Back Ground
===========
I have a project which uses a third party component to cope with loading
and saving non-standard image file formats into an Image control. It does
this by using TPicture.RegisterFileFormat in it's initialization section,
and calls some code to convert the image to a bitmap and then displays it.
I've added a codesite message to this bit of code and it does seem to be
doing this.

Problem
=======
This is where it gets weird (to me at least). If I *build* my project and
then run it, then it will load the new image format into the image control
, but when I try to save it, the component throws an exception that the
image isn't a bitmap. Obviously something has gone wrong.
However if I *compile* my project and run it, all works correctly.

Even if I select Build project and then immediately it's built I select
Compile, it works.
It only fails if I try and run directly after a build.

Now as far as I understand it, when I select build, delphi finds all the
pas files, compiles them into dcu files, then compiles the dpr and then
links everything together into an exe. Similarly when I select compile,
delphi just compiles the dpr and then links everything together into an
exe.

So why would a compile result in a program that works and a build in one
that doesn't ? Does a compile do something extra that I'm missing ?

Anyone any idea how to work out what's going on or suggestions on how to
fix it ?

I've tried compiling/building using DCC32.exe and that exhibits the same
problem, so it doesn't look like it's IDE specific.

(Oh and just to be sure I've removed all the pas files to do with the
troublesome component, so that both the compile & build must be using the
same dcu's)

David



Relevant Pages

  • Re: Compiling Components
    ... peter cook wrote: ... when i try to compile a component i downloaded it keeps asking ... for the pas files which i don't have but i do have the dcu files. ... That means the .dcu files were not compiled for your version of Delphi, ...
    (comp.lang.pascal.delphi.misc)
  • Compiling Components
    ... when i try to compile a component i downloaded it keeps asking for ... the pas files which i don't have but i do have the dcu files. ... on how to get arround the problem. ...
    (comp.lang.pascal.delphi.misc)
  • Re: VB application crashes
    ... I have created an VB application with a MDI form and a lot of ... In VB6, in the project's properties, go to the Compile tab and select ... Run the EXE from Windows Explorer. ... Make sure that you disable "Create symbolic debug info" before releasing ...
    (microsoft.public.vb.general.discussion)
  • Re: Compile - file is not open error
    ... simple hello world type prg and compile it I still get the error. ... I uninstalled and reinstalled VFP9 and SP1 and still get the problem. ... This is happening on my desktop (XP Pro SP2). ... The normal exe is about 4.8MB. ...
    (microsoft.public.fox.helpwanted)
  • Re: acnormal problem
    ... the conversion and .EXE to actually work? ... >Access databases cannot be compiled into executables. ... >installed will be able to install the runtime version of ... if I get to the point where I can compile my ...
    (microsoft.public.access.formscoding)