Author Topic: Seems wrong command line arguments  (Read 6451 times)

Offline Denis

  • Multiple posting newcomer
  • *
  • Posts: 48
Seems wrong command line arguments
« on: September 15, 2007, 07:11:03 pm »
I moved MinGW from c:\MinGW to c:\develop\MinGW directory and change options into project and CodeBlocks in accordance with new path. But after I tryed to compile, I got compiler warning:
Quote
cc1plus.exe: note: obsolete option -I- used, please use -iquote instead
And latter got error:
Quote
error: ../bla-bla-bla.h: No such file or directory
bla-bla-bla.h - is project file

I found same problem here: http://developer.berlios.de/bugs/?func=detailbug&bug_id=7796&group_id=5358 and solution helped (I changed PCH mode in project properies to first). But I want to use second PCH mode. Developers, please fix this bug.


Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Seems wrong command line arguments
« Reply #1 on: September 15, 2007, 07:21:11 pm »
I moved MinGW from c:\MinGW to c:\develop\MinGW directory and change options into project and CodeBlocks in accordance with new path. But after I tryed to compile, I got compiler warning:
Quote
cc1plus.exe: note: obsolete option -I- used, please use -iquote instead
And latter got error:
Quote
error: ../bla-bla-bla.h: No such file or directory
bla-bla-bla.h - is project file

I found same problem here: http://developer.berlios.de/bugs/?func=detailbug&bug_id=7796&group_id=5358 and solution helped (I changed PCH mode in project properies to first). But I want to use second PCH mode. Developers, please fix this bug.

The problem you are facing is not the same one that you are referring. Please post the full command line so that we can understand the problem.

Also, were you getting the warning message before moving MinGW to c:\develop\MinGW directory??
Be a part of the solution, not a part of the problem.

Offline Denis

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Seems wrong command line arguments
« Reply #2 on: September 15, 2007, 07:37:35 pm »
1. How to find out which real command line CodeBlocks uses for compiling?
2. I didn't confronte with this problem before moving from c:\MinGW to c:\develop\MinGW

PS: Wow! Selecting first PCH mode made compile speed really fast. It looks like second PCH mode doesn't works properly

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Seems wrong command line arguments
« Reply #3 on: September 15, 2007, 07:43:49 pm »
1. How to find out which real command line CodeBlocks uses for compiling?

Settings > Compilers and debuggers > Other settings > Compiler logging (Set it to Full logging).

2. I didn't confronte with this problem before moving from c:\MinGW to c:\develop\MinGW

Strange. May be the version detection code needs some clean-up. Did you change the Compiler bin path??

I guess C::B is trying to detect the compiler version. But the execution of GCC fails (probably due to the change in path) and the fall back code sets the version to 3.x. Because you shouldn't get this warning as this has been fixed sometimes back and C::B is now equipped to deal with it. :)
Be a part of the solution, not a part of the problem.

Offline Denis

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Seems wrong command line arguments
« Reply #4 on: September 15, 2007, 07:57:44 pm »
This is command line is sed for compiling pch.h file:
Quote
mingw32-g++.exe -Wall -pipe -mthreads -Winvalid-pch -finput-charset=utf-8 -Wno-attributes -fno-strict-aliasing -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -DWX_PRECOMP -DqWinOS=1 -DqMacOS=0 -DqDNGLittleEndian=1 -DWIN_ENV=1 -g -D__WXDEBUG__ -DWXUSINGDLL  -Iobj\win\Debug\src -I- -Iobj\win\Debug\src -I. -I. -Isrc -Isrc\dng_sdk -Isrc\xmp_sdk\include -Isrc\xmp_sdk\common -Isrc\expat\include -Isrc\MD5 -Isrc\libexif -IC:\develop\MinGW\lib\gcc_dll\mswud -IC:\develop\MinGW\include  -c D:\GCC\DNG4PS-2\src\src\pch.h -o obj\win\Debug\src\pch.h.gch

Yes, I changed compiler bin path to new one

PS: Sorry, forgot to report: MinGW for GCC 4.1.2, C::B SVN 4466

Offline Denis

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Seems wrong command line arguments
« Reply #5 on: September 16, 2007, 09:05:50 am »
What is with this question? Is it my hands problem? :-)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Seems wrong command line arguments
« Reply #6 on: September 16, 2007, 09:26:40 am »
What is with this question? Is it my hands problem? :-)

Definitely it's not your hands' problem. ;)

But there is some mistakes in your project settings which is throwing that error. You can safely ignore that warning. Please check if all the directories from where you're including header files are specified or not.
Be a part of the solution, not a part of the problem.

Offline Denis

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Seems wrong command line arguments
« Reply #7 on: September 16, 2007, 08:58:13 pm »
But there is some mistakes in your project settings which is throwing that error. You can safely ignore that warning. Please check if all the directories from where you're including header files are specified or not.

Why? I don't get any error or warning, when I choose first PCH mode. All directories are specified.

Offline Denis

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Seems wrong command line arguments
« Reply #8 on: September 16, 2007, 09:06:35 pm »
Sources of my project (where bug is reproduced) is here: http://dng4ps2.chat.ru/DNG4PS2_0.2.2RC2_sources.tar.bz2
Just set 'mingw' OS inviroment variable to path to MinGW before compiling
« Last Edit: September 16, 2007, 09:09:33 pm by Denis »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Seems wrong command line arguments
« Reply #9 on: September 17, 2007, 07:21:02 pm »
Sources of my project (where bug is reproduced) is here: http://dng4ps2.chat.ru/DNG4PS2_0.2.2RC2_sources.tar.bz2
Just set 'mingw' OS inviroment variable to path to MinGW before compiling

The link you've provided is not working. Please re-upload it to another site.
Be a part of the solution, not a part of the problem.

Offline Denis

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Seems wrong command line arguments
« Reply #10 on: September 17, 2007, 07:37:01 pm »