MinGW cannot find relative paths

View: New views
5 Messages — Rating Filter:   Alert me  

MinGW cannot find relative paths

by Stephen Morris-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 
I have an application which uses a large number of different header files,
which are referenced according to relative paths. None of the paths have
spaces; an example is:

#include "../../JoystickWidgets/AbstractJoystick/abstractjoystick.h"

When I compile the project using Microsoft C++, it compiles perfectly. When
compiling the exact same source files with MinGW, however, it fails at
certain points in the compile process emitting errors of the form:

"../../JoystickWidgets/AbstractJoystick/abstractjoystick.h: No such file or
directory"

Moreover, I can sometimes get rid of an error by expanding the path; for
example, if I get the error above, it can go away if I put:

#include
"../../../CustomWidgets/JoystickWidgets/AbstractJoystick/abstractjoystick.h"

...but then I might get a new error from a different file with a similar
include statement. Note that:

1) The errors are emitted while the corresponding .cpp files are being
compiled; it seems to be the compiler itself which is having trouble with
the paths, not the makefile.
2) The issue is only seen when I compile the full project; the errors are
not seen when compiling smaller subsets of it, or when compiling complete
smaller projects from the same source files.

I am using MinGW 3.4.5 (which came bundled with Qt Creator 2009.03) under
Vista SP2.

Any advice would be greatly appreciated.
 

__________ Information from ESET Smart Security, version of virus signature
database 4578 (20091106) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MinGW-users mailing list
MinGW-users@...

A: Yes.
> Q: Is it really?
>> A: Because the logical conversation flow is disrupted.
>>> Q: Why does MinGW object to top posting?
(abstracted from Larry Hall signature)

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Re: MinGW cannot find relative paths

by Greg Chicares-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-11-06 11:08Z, Stephen Morris wrote:
>  
[...headers on relative paths not found, e.g.:]
>
> "../../JoystickWidgets/AbstractJoystick/abstractjoystick.h: No such file or
> directory"
[...]
> 1) The errors are emitted while the corresponding .cpp files are being
> compiled; it seems to be the compiler itself which is having trouble with
> the paths, not the makefile.
> 2) The issue is only seen when I compile the full project; the errors are
> not seen when compiling smaller subsets of it, or when compiling complete
> smaller projects from the same source files.

First, see whether this helps you:
  http://www.mingw.org/wiki/IncludePathHOWTO
If not, then the next step is to post a minimal self-contained
test case so that others can easily reproduce the problem.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MinGW-users mailing list
MinGW-users@...

A: Yes.
> Q: Is it really?
>> A: Because the logical conversation flow is disrupted.
>>> Q: Why does MinGW object to top posting?
(abstracted from Larry Hall signature)

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Parent Message unknown Re: MinGW cannot find relative paths

by Stephen Morris-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 06 Nov 2009 13:54:35, Greg Chicares wrote:

>
>On 2009-11-06 11:08Z, Stephen Morris wrote:
>>  
>[...headers on relative paths not found, e.g.:]
>>
>> "../../JoystickWidgets/AbstractJoystick/abstractjoystick.h: No such
>> file or directory"
>[...]
>
>First, see whether this helps you:
>  http://www.mingw.org/wiki/IncludePathHOWTO

Thank you; though I had in fact already checked out the page you link to and
I am following its advice (full relative paths, no spaces) already.

>If not, then the next step is to post a minimal self-contained test case so
>that others can easily reproduce the problem.

Trouble is, the problem only appears when I try to compile the full
application; when I compile smaller subsets of it the errors don't occur,
even though I'm using exactly the same source files in exactly the same
directory structure.

I'll see if I can reproduce this myself an XP and/or Linux box (with plain
gcc) in the next few days; that may tell me whether it's specific to Vista
or to MinGW, or an underlying gcc issue.

 

__________ Information from ESET Smart Security, version of virus signature
database 4580 (20091106) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Parent Message unknown Re: MinGW cannot find relative paths

by Stephen Morris-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Parent Message unknown Re: MinGW cannot find relative paths

by Stephen Morris-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 6 Nov 2009, I wrote:
 

>On Fri, 06 Nov 2009 13:54:35, Greg Chicares wrote:

>>If not, then the next step is to post a minimal self-contained test case so that others can easily reproduce the problem.

>Trouble is, the problem only appears when I try to compile the full
>application; when I compile smaller subsets of it the errors don't occur,
>even though I'm using exactly the same source files in exactly the same
>directory structure.

>I'll see if I can reproduce this myself on an XP and/or Linux box (with plain gcc) in the next few days; that may tell me whether it's specific to
>Vista or to MinGW, or an underlying gcc issue.
 
I see the same problem if I try to compile with MinGW on Windows XP, but with g++ 4.3.1 under Linux (OpenSuse 11.1) the same source code with the same makefile compiles without error.
 
So, as the source code compiles cleanly with MSVC under Windows or g++ under Linux, but not with MinGW under either Vista or XP, it does seem to be a specific MinGW issue.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users