File not found in Delphi 7
Asked Answered
F

2

6

I am a beginner in Delphi. I am getting the error File not found : 'StreamFlashPlayer.dcu' in Delphi 7.

How can I fix this error and from where I get this StreamFlashPlayer.dcu file

Floatation answered 15/6, 2011 at 7:43 Comment(2)
short version: You have unit named StreamFlashPlayer in your unit uses clause, and the compiler is complaining because you haven't configured your library path, so that it can find either the binary (dcu) or source (pas) version of that unit.Panto
Welcome to StackOverflow and welcome to Delphi.Bis
R
10

I suppose you have you downloaded some source code Delphi project from the web and are trying to compile it in your IDE.

The StreamFlashPlayer.dcu unit is not part of the standard Delphi installation (at least I've never heard of it).

What I've found is a component called StreamFlashPlayer 0.5 on Torry's Delphi Pages. You'd have to download and install the component in the Delphi IDE before you can compile the source code for your project.

Rancid answered 15/6, 2011 at 8:13 Comment(0)
Z
11

A DCU is the compiled version of a PAS file.

So whenever you get this error, you can resolve it either by ensuring Delphi can access the DCU file, or the PAS file. (Usually the PAS file is the better option.)

You might have to search your machine to find out if you have a copy of this file in the first place. From a Command prompt you can search as follows: dir /a/s StramFlashPlayer.*

Delphi finds the files it needs to compile a project in the following ways:

1. Explicitly included in your project file.

E.g.

uses
  Forms,
  MyUnit in 'MyUnit.pas',
  UnitInAnotherFolder in '..\AnotherFolder\UnitInAnotherFolder.pas';

2. Included in the Search Path of your project

This is a list of folders where Delphi will search for the required file. It's configured on a per-project basis under Project Options.

3. Included Library Path

This is another list of folders where Delphi will search for the required file. It's configured for all projects in the Environment Options.

Choosing which option to use

You probably want to use option 1 in most cases. Especially if it's a file you'll likely be editing.

If the file is provided by someone else (3rd party components etc.), you probably want option 2 or 3, depending on whether the 3rd party library will be used in most of your projects or just a small number of specific ones.

Zygoma answered 15/6, 2011 at 11:3 Comment(0)
R
10

I suppose you have you downloaded some source code Delphi project from the web and are trying to compile it in your IDE.

The StreamFlashPlayer.dcu unit is not part of the standard Delphi installation (at least I've never heard of it).

What I've found is a component called StreamFlashPlayer 0.5 on Torry's Delphi Pages. You'd have to download and install the component in the Delphi IDE before you can compile the source code for your project.

Rancid answered 15/6, 2011 at 8:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.