Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I couldn't find an actual programming forum.
so if this is the wrong place I apologize.
If I am I have questions...
I have been programming for years, and most of it in Visual Stupid.
And I really want to get into programing in the *nix environment.
Are there any good tutorials out there that are gear toward individuals wanting to make the win to *nix transition.
I understand C, C++ syntax. But I have no understanding of make file(s). Most of that kind of thing was handled by VS. I have tried googling this but I either find too little or too much. Nothing I have found seems to be gear towards coders in transitions.
I am thinking emacs or some other NON-IDE environment.
Any help you can offer would be very much appreciated,
so if you would point, boot me in the right direction.
Put these lines into a file called Makefile and run make in the directory. make will look for a file called Makefile, makefile or (for gmake) GNUMakefile. This file will be parsed and the defined rules are evaluated. In the above example this looks as follows:
make will find a rule: the file 'myprogram' depends on 'main.o', 'io.o' and 'file.o'. If any of these files is newer than myprogram, g++ will be called to update myprogram. But because 'myprogram' depends on 'main.o', 'main.o' will be checked for update too. Because you did not define a rule for 'main.o', a built-in rule will be used. In this case, if e.g. 'main.cpp' exists, g++ will be called with the flags CPPFLAGS to create main.o
I am at work (in Visual Stupid LOL)
and I have yet to info/man gcc,ld,as, make etc yet.
In winworld there are (dll or class libraries). in *nix they are just libraries right?
How do these get compiled and referenced ("linked???")
for example I want to write an program:
"doessomething" but I want "doessomething" to have a command line interface and a xwindows one.
So I would like to...
have a common library for all the something that "doessomething" does.
and two programs
so I want:
"doessomethinglib"
"doessomething" uses "doessomethinglib"
"xdoessomething" uses "doessomethinglib"
In Visual Stupid I would
Create one solution with
Class Lib uses "doessomething.dll"
a console app "doessomething.exe"
a windows app "xdoessomething.exe"
All the building and referencing (linking?) is all done by the ide.
I am assuminig in *nix and gcc or g++ I would have to write and build my own "makefile" to do the build which is kewl. this is what I want to learn.
If anyone understands my babbling, and can (has the interest and time) put together a "super simple sample example" I learn by playing/breaking more than I do by reading.
Thanks, I really appreciate it.
Last edited by usul.the.mouse; 01-29-2010 at 04:07 PM.
Don't mess with makefile, we are in 2010, not in 1995, higher level tools have now reached a superior state to old makefiles. Even with 5 years of Linux programming and clone to a decade of using, I don't even understand them. Why?
-Because gcc/g++ command are simple for small apps
-IDE generate them for you like in Visual Studio
-CMake is better and easier than the 2 above.
KDE/Qt is really well designed and in some way (signals and slots) superior to .NET C++. My advice would be to learn to use it. You get a nice IDE called Qt creator or use the much more advanced, but much more complicated KDevelop, an interface designer and all you need. For hard core programmer, vi and some advanced notepad with embeded terminal (Kate) are there too, I prefer the later to an IDE, but that's just taste or habit, I don't know nor does I care.
KDE have a good bunch of started guide. First, you can have a sanboxed development environement isolated from your system, you you can use all latest and greatest SVN/Git build of everything: http://techbase.kde.org/Getting_Started/Build/KDE4
This archive contains a Makefile and several c++ source files. The makefile creates a shared library "libsimple.so" and links two programs against it. Maybe it'll help you. Just unpack the archive and type make in the top directory.
In general there is no difference between gui and console programs in linux, except for the libraries they use. So if you are familiar with creating console programs and with a Gui library like Gtk or Qt there should be no problems creating gui programs.
Don't mess with makefile, we are in 2010, not in 1995, higher level tools have now reached a superior state to old makefiles. Even with 5 years of Linux programming and clone to a decade of using, I don't even understand them. Why?
Because some of the programing I want to do is commandline based,
and on Minix3. So IDE is not available, or at least I don't think it is.
And I am defiantly not ready to to specialize QT vs GTK
Besides its good to understand what is going on, I think.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.