User forums > Using Code::Blocks

CB ignores search directories/Global variables

<< < (4/7) > >>

stahta01:

--- Quote from: eb on January 20, 2012, 10:50:52 pm ---OK you win.  I'm switching back to non-cygwin headers/libs BUT this codeBlocks problem is still a problem!


--- End quote ---

Note: I was wrong about you using the Cygwin Compiler. You are trying to use the MinGW-64 compiler that was modified by the Cywgin group to work in the Cygwin environment. This is more likely to work.

But, a problem is that Code::Blocks does not work that well the Cygwin GCC as compared to MinGW GCC.

NOTE: A question I forgot to ask are you using Windows 64-bit OS; because I think the version of MinGW-64 you are using requires that to be true.

Tim S.

eb:
2 things:
  1- I'm on XP-64bit and this program is for machines running 7-64bit.

  2-I started another new project but in a new folder and CodeBlocks Search directories settings seemed to work fine.  But when I came back to this project and switched back to Cygwin GCC the compiler is once again searching the directories of the previous project even though I have changed the default compiler and search directories.

Does this sound familiar?
Is this a bug?

edit: To re-cap:
  Search directories:
    C:\cygwin\home\eb\rap02
    C:\cygwin\usr\include

  yet Open #include file: 'rpc/clnt.h' opens "C:\rap02\include\glibc\rpc\rpc.h".
  C:\rap02\include\glibc is the search directory from the previous project.

stahta01:
There is two major places to change the search directories.

The compiler settings and the project/task settings.

You likely have only fixed one of them.

NOTE: I had to add the Cygwin include folder to search list for rpc.h to be found.

You will need to change "C:\GreenApps\Cygwin1_7" to "C:\cygwin"

I added include search folder "C:\GreenApps\Cygwin1_7\usr\include\tirpc"

Edit: This might work also "$(TARGET_COMPILER_DIR)\usr\include\tirpc".

My build command. Updated because I saw two search folders removed one.

--- Code: ---i686-pc-cygwin-gcc-4.exe -Wall  -g    -IC:/GreenApps/Cygwin1_7/usr/include/tirpc  -c H:/SourceCode/Projects/test-i686-w64/main.c -o obj/Debug/main.o
i686-pc-cygwin-g++-4.exe  -o bin/Debug/test-i686-w64.exe obj/Debug/main.o    -ltirpc

--- End code ---

Note: "H:/SourceCode/Projects/test-i686-w64" is my project folder.

Tim S.

stahta01:
I have decided that using the real Cygwin GCC likely works; but, trying to use the MinGW GCC versions are not possible for me to do. So, if you try the CygWin option I will help from time to time. But, the MinGW GCC is not worth any more effort on my part. Next post please include your Code::Blocks version; I am guessing it is 10.05.

Tim S.

eb:
Yes CodeBlocks 10.05
Windows XP Pro x64

Turns out both the compiler AND search directories problems are connected
For some reason now and then CodeBlocks ignores my Selected compiler and all of it's settings.
Currently no matter which Selected compiler I pick it will only use the Cygwin GCC settings.
I even set MinGW GCC as default, saved everything, closed/opened CodeBlocks, confirmed that MinGW GCC was my selected compiler, rebuilt the workspace, and it's still using my cygwin settings for Search directories and compilers.  Even double checked to confirm that my selected compiler was still MinGW.
I also confirmed the location of the files.
fyi - the difference between my MinGW settings and my Cygwin settings is the MinGW Search directories are under my c:\MingW directory.  My MinGW compilers are the ones in the c:\cygwin\bin directory with the default cygwin compiles.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version