Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 978965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:08:37+00:00 2026-05-16T04:08:37+00:00

I have different behaviour of compiler, when building project from IDE and from command-line,

  • 0

I have different behaviour of compiler, when building project from IDE and from command-line, which I can not explain.

The detailed issue’s description is rather big, but it’s really simple.

I have a C++ Builder project, which has a PAS-file included (IncludeUnits.pas). This pas-file has several units and inc-files listed. These files are located in separate folders and these folders are listed in library&include paths in project’s options.

Folders layout:

C:\Demo\Bin
C:\Demo\Project
C:\Demo\Project\CBuilder5
C:\Demo\Project\Common
C:\Demo\Source
C:\Demo\Source\Common

Bin is output folder, Project/CBuilder5 holds project (bpr-file), Project/Common holds included pas-file (IncludeUnits.pas), Source and Source/Common hold other files (pas&inc). I think that it’s pretty usual layout.

C:\Demo\Project\Common\ IncludeUnits.pas :

unit IncludeUnits;

interface

uses
  Test;

implementation

end.

C:\Demo\Source\ Test.pas :

unit Test;

interface

{$I Test.inc}

implementation

end.

C:\Demo\Source\Common\ Test.inc :

// this file is empty

If I compile this project from C++ Builder IDE – it will compile fine. C++ Builder IDE doesn’t have any additional paths in IDE settings set.

Now, I want to compile it from command-line. First, I issue

bpr2mak.exe MyProject.bpr

command.

This command creates MyProject.mak file, where I can see all paths (“….\Source” and “….\Source\Common” are the paths in question):

…
INCLUDEPATH = $(BCB)\include;$(BCB)\include\vcl;..\Common;..\..\Source;..\..\Source\Common
LIBPATH = $(BCB)\lib\obj;$(BCB)\lib;..\Common;..\..\Source;..\..\Source\Common
…

Now, I run make command:

make.exe -B -f”MyProject.mak”

It gives me the following output:

C:\PROGRA~1\Borland\CBUILD~2\BIN\dcc32 -N2….\Bin -N0….\Bin -$Y+ -$W -$R -v -JPHNE -M -UC:\PROGRA~1\Borland\CBUILD~2\bin..\include;C:\PROGRA~1\Borland\CBUILD~2\bin..\include\vcl;..\Common;..\..\Source;..\..\Source\Common -D_DEBUG;_RTLDLL;NO_STRICT -OC:\PROGRA~1\Borland\CBUILD~2\bin..\include;C:\PROGRA~1\Borland\CBUILD~2\bin..\include\vcl;..\Common;..\..\Source;..\..\Source\Common –BCB ..\Common\IncludeUnits.PAS
Borland Delphi Version 13.0 Copyright (c) 1983,99 Inprise Corporation
C:\Demo\Project\Common\IncludeUnits.pas(1) C:\Demo\Project\Common\IncludeUnits.pas(1) C:\Demo\Project\Common\IncludeUnits.pas(1) C:\Demo\Project\Common\IncludeUnits.pas(6) C:\Demo\Source\Test.pas(1) C:\Demo\Source\Test.pas(5) Fatal: File not found: ‘Test.inc’

As you can see – all search path is passed to compiler and the file (Test.inc) is all here – in that Source\Common folder. But still compiler can’t find it?

Of course, I run both commands from folder with bpr-file. And changing paths to absolute doesn’t help.

Copying Test.inc from Source\Common to Source will help. Changing {$I Test.inc} to {$I Common\Test.inc} will also help.

Why? It seems that I’m missing something. Remember: project have no problems with compiling from IDE, Test.inc is found without copying or changing declaration. Did I miss some switch to make or dcc32?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:08:38+00:00Added an answer on May 16, 2026 at 4:08 am

    I found the reason: command line for dcc32 misses -I switch, which specifies paths for include files.

    For some reason, bpr2mak doesn’t respect this option. Fortunately, it allows you to specify alternate template for conversion bpr -> mak. I edited default template and added “-I” option to it, pass new template to bpr2mak – and it worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Windows Mobile devices have different behaviour for suspending when the device is on battery
You can have different naming convention for class members, static objects, global objects, and
different programming languages have different features or lack certain features. Design patterns are a
I have noticed over the years that different developers have different criteria for what
When I have two mysql servers that have different jobs (holding different databases) but
Since I'm sure many people have different standard, I've made this post a community
I'm working on a SaaS application where each customer will have different configurations depending
I need to write a program used internally where different users will have different
I have several different c# worker applications that run various continuous tasks: sending emails
I have two different ways of displaying items in a WPF application. The first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.