Forum > General

"Build" compiles unwanted source code

(1/1)

davelane:
I'm totally new to Lazarus (win32) and I am experimenting in trying to port a Borland Delphi app.

I started with a blank application and tried adding a bunch of non-graphic units to the project. They are all located in a sub-folder of the project directory. I have been able to build all these units individually without problems, but when I build the full project it tries to compile a bunch of .pas files that are in the same directory but are not included in the application (units not referenced in the project). If I remove the first file that it tries to compile, it just goes down to the next one.

Any idea why it does this or how to stop this behavior?

--- Dave

cpalx:
did you add your .pas files to your project?. Open your project then open all files and press Shift+F11 (Windows and linux) in mac press MAC + OPT + A. You must do it file by file

davelane:
All of the units that I want to include were added using the Shift-F11. These units include some additional .pas files via explicit {$I file.pas} lines in the unit source.

But the the problem is that the build includes other .pas files not part of the project.

--- Dave

marcov:

--- Quote from: davelane on July 11, 2010, 08:04:07 pm ---
But the the problem is that the build includes other .pas files not part of the project.

--- End quote ---

Keep in mind that Pascal compilers with unit systems recursively search their own files. Apparantly these files are referenced in your sources somewhere.

davelane:
Unfortunately this is not the case here. The one it catches first is actually the main program of a utility program.

--- Dave

Navigation

[0] Message Index

Go to full version