LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-19-2009, 04:56 PM   #1
Katherine
LQ Newbie
 
Registered: Jan 2009
Location: New Hampshire
Distribution: CentOS
Posts: 9

Rep: Reputation: 0
Question Makefile VS IDE build?


I have relatively large piece of source code that needs to be built in the Linux Environment. The code originally written in MS VS in Windows. We used QT functions for easy portability. The source files are scattered through the folder structure. Project's sources are not located in one source folder. (I didn't write the software).

Now I need to decide how to build the software on Linux. I thought Makefiles would be best. I saw some tutorials that made them seem easy. I do know if a makefile was successfully created, this will save time during the build process. Control Management are not software engineers and easily lead towards confusion. "What do you mean by ..." With a make file, they just need to type a line! However, another coworker claimed they were super difficult and error prone and suggested using Eclipse C/C++ to create the build.

I installed Eclipse C/C++. There is seemingly no way to add source code in different folders to one project. If this is true, Eclipse will be a pain. I wanted to maintain folder structure and link to .cpp files. This will prevent duplicates of files. However, once the Eclipse projects are set up, debugging will be easy. Also, the other engineers are used to GUIs/IDEs instead of command prompts, vim, and other native Linux programs.

Both solutions seem to have pros and cons. What have your experiences been? I also would like some opinions beyond my co-worker.
 
Old 01-19-2009, 06:51 PM   #2
raconteur
Member
 
Registered: Dec 2007
Location: Slightly left of center
Distribution: slackware
Posts: 276
Blog Entries: 2

Rep: Reputation: 44
I normally use an IDE for large projects with deep directory trees (I consider any more than three levels deep for source trees).

Makefiles are one of the more cryptic aspects of *nix programming -- and one of the very few places where white space matters.
Tabs do not equal spaces in a makefile (they've overloaded the whitespace operator )

That being said, I also frequently modify makefiles by hand.
I'd have a look at other largish projects for makefile examples.
 
Old 01-19-2009, 07:14 PM   #3
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Qt has its own make file program qmake. This is available for both windows and Linux (and Mac of course) qmake is well documented and typically easier to set up than make. The IDE can then be configured to use the "make" file. I alternate between using KDevelop and QDevelop, the later being an IDE written using QT and is thus available on your target OS (whatever that may be) both IDEs allow me to use multiple directories, I can't talk for Eclipse since I rarely use it but I would be surprised if it didn't manage project files scattered all asunder.
 
Old 01-19-2009, 09:50 PM   #4
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
As graemef already mentioned, qt has its' own qmake-build system (based on *.pro files), which is cross-platform. So the best idea would be using that syste where it is possible.

However, if you want something different...
Quote:
Originally Posted by Katherine View Post
IHowever, another coworker claimed they were super difficult and error prone and suggested using Eclipse C/C++ to create the build.
I don't think you really want to use raw hand-written makefiles for large projects. Idea of ide is also bad.

Using scons with it's SConstruct scripts, or gnu autotools would be better. Both those systems are "higher level" when compared to raw makefiles.
 
Old 01-20-2009, 06:08 AM   #5
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
project file (*.pro) for qmake are really easy to understand and write by hand, then qmake transforms your pro file into makefile.
That said, eclipse is not too bad for developing Qt applications, but you'll need the Qt plugin you can found on the trolltech site.
However, I prefer work without IDE, just gvim + ctags + svn and pro files by hand because I know how to use these tools and, my little experience with eclipse and svn plugin wasn't great, I've wasted so many time by trying to resolve some issues, and worst, I don't find the way to have more than one application target in the same eclipse project...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ide for g++ programming and how to build make file? matiasar Programming 7 09-15-2008 09:57 AM
Adapting IDE to custom build system Millenniumman Programming 1 02-11-2007 09:41 PM
Is there a good Makefile-generating IDE for Linux? DaneM Programming 6 09-19-2005 07:24 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration