Compiler gcc:error; no such file or directory

I am extremely new to programming and I am having problems with the basic starting program of, ‘hello, world’. I have downloaded MinGW and I believe I set it up correctly with the command promt by entering: setx PATH “%PATH%;C:\MinGW\bin” Then I created this code following a guide while using Notepad++ saving it under c:/code/c/hello.c … Read more

I don’t understand -Wl,-rpath -Wl,

The -Wl,xxx option for gcc passes a comma-separated list of tokens as a space-separated list of arguments to the linker. So eventually becomes a linker call In your case, you want to say “ld -rpath .“, so you pass this to gcc as -Wl,-rpath,. Alternatively, you can specify repeat instances of -Wl: Note that there is no comma between aaa and the second -Wl. Or, in … Read more

Make Error 127 when running trying to compile code

Error 127 means one of two things: file not found: the path you’re using is incorrect. double check that the program is actually in your $PATH, or in this case, the relative path is correct — remember that the current working directory for a random terminal might not be the same for the IDE you’re … Read more

C Unknown type name ‘my_structure’

Because of how you’ve ordered your includes, the compiler sees void some_func(my_structure *x); before it sees typedef struct abcd { int a; } my_structure;. Let’s walk this through. Assuming my_struct.h is processed first, we get the following sequence of events: UTILSH is defined MAINH is defined Because UTILSH is already defined, we don’t process my_struct.h … Read more

How to repair warning: missing braces around initializer?

Yes, this appears to be related to GCC bug 53119. It goes away if you change the C declaration to {{0}}. Your options are: Ignore the warning. Manipulate the C code after generation to have {{0}} instead of {0} on that line using sed or the like. Declare the array extern in Vala, and write the C definition elsewhere. (The permanent version of #2.) Do … Read more