User forums > Using Code::Blocks

CB ignores search directories/Global variables

(1/7) > >>

eb:
Googled it and scoured this site for a couple of days.  Now I'm asking.

Why is it that when I "#include rpc.h" the compiler always throws me a "error: rpc.h: No such file or directory"?

My search directories (compiler) are:
  ..\..\..\usr\x86_64-w64-mingw32\sys-root\mingw\include
  C:\cygwin\usr\x86_64-w64-mingw32
  C:\cygwin\usr\x86_64-w64-mingw32\sys-root\mingw\include

My BuiltIn fields are:
  base: C:\cygwin\usr\x86_64-w64-mingw32\sys-root\mingw
  Include: C:\cygwin\usr\x86_64-w64-mingw32\sys-root\mingw\include

My Selected compiler is Cygwin GCC

My rpc.h file is: C:\cygwin\usr\x86_64-w64-mingw32\sys-root\mingw\include\rpc.h

stahta01:
Did you try turning on full compiler logging and reading the build logs?

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Edit: You do know that you are still likely mixing Cygwin and MinGW headers and this is likely NOT to work.

Tim S.

eb:
All the Build Log shows is this:

-------------- Clean: Release in rap00 ---------------

Cleaned "rap00 - Release"

-------------- Build: Release in rap00 ---------------

Compiling: main.c
In file included from C:\cygwin\home\eb\rap00\main.c:10:
C:\cygwin\home\eb\rap00\rap.h:10:17: error: rpc.h: No such file or directory
In file included from C:\cygwin\home\eb\rap00\main.c:10:
C:\cygwin\home\eb\rap00\rap.h:310: error: expected ')' before '*' token
C:\cygwin\home\eb\rap00\main.c: In function 'rapvar_read_name_1':
C:\cygwin\home\eb\rap00\main.c:40: warning: function returns address of local variable
C:\cygwin\home\eb\rap00\main.c: In function 'main':
C:\cygwin\home\eb\rap00\main.c:47: warning: unused variable 'Pclient'
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 2 warnings

I was under the assumption that I set something wrong and need to be pointed to the proper setting.
 
Also, I'm trying to use only the mingw headers/libs that came via the cygwin installer. 
I'm hoping they already have a facility for this problem.

Jenna:

--- Quote from: stahta01 on January 20, 2012, 03:12:11 am ---Did you try turning on full compiler logging and reading the build logs?

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

--- End quote ---

stahta01:
I suggest you also read my response in the cboard forum; which I am guessing was started by you.

http://cboard.cprogramming.com/c-programming/145288-undefined-reference-clnt_create.html

Feel free to keep the Code::Blocks questions in this thread; but, I think the root cause of your problem is a Compiler question that is not correct to post this forum.

Tim S.
 

Navigation

[0] Message Index

[#] Next page

Go to full version