Code::Blocks Forums

User forums => Help => Topic started by: Denis on September 15, 2007, 07:11:03 pm

Title: Seems wrong command line arguments
Post by: Denis 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.

Title: Re: Seems wrong command line arguments
Post by: Biplab 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??
Title: Re: Seems wrong command line arguments
Post by: Denis 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
Title: Re: Seems wrong command line arguments
Post by: Biplab 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. :)
Title: Re: Seems wrong command line arguments
Post by: Denis 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
Title: Re: Seems wrong command line arguments
Post by: Denis on September 16, 2007, 09:05:50 am
What is with this question? Is it my hands problem? :-)
Title: Re: Seems wrong command line arguments
Post by: Biplab 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.
Title: Re: Seems wrong command line arguments
Post by: Denis 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.
Title: Re: Seems wrong command line arguments
Post by: Denis 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
Title: Re: Seems wrong command line arguments
Post by: Biplab 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.
Title: Re: Seems wrong command line arguments
Post by: Denis on September 17, 2007, 07:37:01 pm
Sorry. This is another link: http://www.zshare.net/download/370063622348f1/