Reply to topic

Setup Kdevelop to compile C programs

dzchimp
Registered Member
Posts
3
Karma
0
OS

Setup Kdevelop to compile C programs

Thu Apr 26, 2012 10:09 am
I've installed Kdevelop, and need a bit of help to setup for compiling with gcc.

Image

I need to find the variable that stands for the current source file, so that I can pass an argument like:

gcc %filename -o filenamewithoutextension

Example:

gcc test.c -o test

Or is there a simpler way to set up Kdevelop?
User avatar Milian Wolff
KDE Developer
Posts
61
Karma
1
OS
Yes, there are much simpler ways to achieve this.

The simplest would be to use "external scripts", there is even a quickcompile example that does just what you are looking for.

The alternative would be to use CMake, you example above would be a single line there:

add_executable(myExe myCode.c)


current KDE projects: Quanta, KDevelop, Kate

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], exahamza, Google [Bot], jkurutz, Majestic-12 [Bot], razorrob, shevchuk, Sogou [Bot]