Author Topic: C:B generates -I- compiler option when calling gcc, how turn it off  (Read 7296 times)

Offline amarty

  • Multiple posting newcomer
  • *
  • Posts: 41
 Hello!

 %subj%

 When I compile my sources that use #include "file.h" inclusion syntax, I set Settings/Compiler and Debugger/Other settings - Explicitly add currently compiling file's directory to compiler search path turned on, and all is ok.
 No I try compile sources that usage boost, and compilation fails on boost/detail/sp_counted_base_gcc_x86.hpp at line 27, containing
Code
#include "sp_typeinfo.hpp"

 I think this problem occurs becose -I- option used when compiling performed.

 Can anybody help me?
« Last Edit: September 18, 2008, 05:03:20 pm by amarty »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: C:B generates -I- compiler option when calling gcc, how turn it off
« Reply #1 on: September 18, 2008, 06:15:12 pm »
I think this problem occurs becose -I- option used when compiling performed.

The -I- option happens on projects with the precompiled settings of an certain option.

Use "Project" -> "Properties.."

Under "Precompiled Headers" there is three strategies try picking diffrent one.

NOTE: The above assumes you are using projects, if not please try to use an project first.

Pardon Me, been up for about 24 hours making dumb mistake, Just deleted the mistake part.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline amarty

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: C:B generates -I- compiler option when calling gcc, how turn it off
« Reply #2 on: September 18, 2008, 06:28:58 pm »
I think this problem occurs becose -I- option used when compiling performed.

The -I- option happens on projects with the precompiled settings of an certain option.


Thanks for help. I was download cb sources and find solution in there. If pch mode is pchObjectDir (In the objects output dir, along with other object files), in this case -I- prepend other include options.

In project properties dialog on label wroten - "Generate pch alongside the source header (default)" - constant pchSourceFile (=2), in my generated project there is no values controling pch generation, and C::B applies pchObjectDir (1), not a default value pchSourceFile (2) when loading such project. It seems like a little bug.


Offline amarty

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: C:B generates -I- compiler option when calling gcc, how turn it off
« Reply #3 on: September 18, 2008, 08:55:11 pm »
 I think problem described above is bug, and want to report it. I read the topic named "IMPORTANT! BEFORE ASKING FOR HELP ", but not understand where I can find bugreport webpage (point #5). Is it so hard to place url into that small FAQ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: C:B generates -I- compiler option when calling gcc, how turn it off
« Reply #4 on: September 18, 2008, 09:14:00 pm »
I think problem described above is bug, and want to report it. I read the topic named "IMPORTANT! BEFORE ASKING FOR HELP ", but not understand where I can find bugreport webpage (point #5). Is it so hard to place url into that small FAQ?

IIRC, the bugreport webpage is on main wiki page on the lower right side.

FYI: The devs knows about this problem, I posted on it about 6 months ago.
But, it was only causing issues on MinGW GCC 4.x builds which were not supported back then.
But, I know of no bug report; so, feel free to submit one.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline amarty

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: C:B generates -I- compiler option when calling gcc, how turn it off
« Reply #5 on: September 18, 2008, 10:03:21 pm »
FYI: The devs knows about this problem, I posted on it about 6 months ago.
But, it was only causing issues on MinGW GCC 4.x builds which were not supported back then.But, I know of no bug report; so, feel free to submit one.

Don't understand this. I have a C::B v8.02 with (in C::B package) MinGW gcc version 3.4.5 (mingw-vista spcial) and C::B same ver on Linux gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21), both C:B versions have this problem

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: C:B generates -I- compiler option when calling gcc, how turn it off
« Reply #6 on: September 18, 2008, 10:04:27 pm »
Yes, this issue is certainly not limited to a GCC version.

FYI: The devs knows about this problem, I posted on it about 6 months ago.
And I over a year ago. ;)
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: C:B generates -I- compiler option when calling gcc, how turn it off
« Reply #7 on: September 19, 2008, 12:11:12 am »
Yes, this issue is certainly not limited to a GCC version.

FYI: The devs knows about this problem, I posted on it about 6 months ago.
And I over a year ago. ;)

IIRC Gcc 3.x just gives warning about, but GCC 4.x gives errors.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: C:B generates -I- compiler option when calling gcc, how turn it off
« Reply #8 on: September 19, 2008, 01:33:39 am »
IIRC Gcc 3.x just gives warning about, but GCC 4.x gives errors.
No, this really is a case of include directives not being resolved. Here's my original post on this issue. (Over 2.5 years old, actually!)
« Last Edit: September 19, 2008, 01:35:35 am by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)