0

I'm having problems finding information on the codes for compile and build using Geany / GCC.

My compile command is: gcc -Wall -c "%f" `pkg-config --cflags gtk+-3.0 Compile is OK, although I really don't know what "%f" means

My build command is: gcc -Wall -o "f" "%e" `pkg-config --libs gtk+-3.0 Build fails with error: Process failed (Failed to change to directory '*' (No such file or directory) This begs the question of what "%e" is. Where is the directory called out in these lines? If the compile is ok, it found the correct directory. What is causing the build to fail for changing directory?

BTW: The file I'm trying to run is just a console app....Hello World

  'GCC -g HelloWorld.c -o HelloWorld '    in terminal works fine
   I just can't seem to figure how to use the Compile and Build 
           under 'Set Build Commands'

One other.....I type MAN GCC Response is: 'No manual entry for gcc'

Sorry for long question(s). I don't know how to search for answers of the "%e" and "%f" questions. The Geany manual doesn't show it. I can't find a manual for GCC

0

I am trying to run the same app as you for the same reasons (trying to learn C/C++ and GTK+) but not having a lot of success.

I don't have a complete answer for you, but perhaps just a push in the right direction. You can read about the various "%" flags here: https://wiki.geany.org/howtos/configurebuildmenu

it states: Within the command and working directory entries the following character strings are substituted when the command is run.

%f - replaced by the filename of the file selected in the editor when the menu item is selected.

%e - replaced by the same filename but without the last extension.

%d - replaced by the absolute path of the directory of the file selected in the editor when the menu item is selected.

%p - replaced by the absolute path of the base directory of the currently open project.

More than one substitution can be made so for instance %d\%e.exe would be used for the absolute filename of an executable on a windows system.

Regards, Jeff (the BigGreenOne)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.