Page 1 of 1

C Workspace?

Posted: Wed May 03, 2017 12:37 am
by BYTetra
I only see C++ available. How do I enable a C workspace? I'm new to coding.

Re: C Workspace?

Posted: Wed May 03, 2017 1:14 pm
by DavidGH
Hi,

Create a new C++ workspace (perhaps they should be called C/C++ workspaces).

If you want to write a non-gui C program, add a new project to the workspace, choosing a 'Simple executable (gcc)' template from the 'Console' list.

Or, if you want a gui project and it must be C rather than C++, you can choose either of the 'Executable GUI GTK...' templates from the 'GUI' list. However they uses the gtk+ toolkit, either version 2 or 3, to provide the gui, so it means you would have to learn how to interact with gtk+.

Either way, check it builds and runs, then start altering the code to do what you wish.

Regards,

David

Re: C Workspace?

Posted: Wed May 03, 2017 9:00 pm
by BYTetra
Thanks David. I'll keep this in mind. I am using a course to learn C. I'm pretty much a total beginning, though for a few months in 2015 I tried to learn Python, without success.

Re: C Workspace?

Posted: Wed May 03, 2017 9:03 pm
by BYTetra
What compiler should I use? Clang?

Re: C Workspace?

Posted: Wed May 03, 2017 9:19 pm
by DavidGH
What compiler should I use? Clang?
Whichever you like. gcc is the commoner choice, except on OSX.