From owner-freebsd-questions@FreeBSD.ORG Sun Apr 21 05:57:46 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AE133910 for ; Sun, 21 Apr 2013 05:57:46 +0000 (UTC) (envelope-from ctorchia87@gmail.com) Received: from mail-oa0-f53.google.com (mail-oa0-f53.google.com [209.85.219.53]) by mx1.freebsd.org (Postfix) with ESMTP id 750D1794 for ; Sun, 21 Apr 2013 05:57:46 +0000 (UTC) Received: by mail-oa0-f53.google.com with SMTP id m6so5002622oag.26 for ; Sat, 20 Apr 2013 22:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=ZR+Tkld9IuA3irT6Ch2CGZ5RSE9CzSlbmcazue5yafg=; b=rdVTGB5ejfFUne4lAcCjPtWewyR0JayQYA38Tg0UPI62LV3FPE+L849yP8oQJJdX/c tbgD2C4jIuqzqHG5ntPnjsCHgSozEbWSVPxdOOwGPFtHtci44Rq4B9W/t/YuIbDSItgd LbU0k1tScMbi5LBR0RpmlxvInhmWDEqNh67DjH71bPbX+RN7uSJW4pRRLP8S23MvRkvT I6mAJCiz7NxUYCumlysh3TH1BeB1A3TeF1YIDpwk9mTx9ascCXeInD/WN6U2L2ZwvfyQ YTKNDAKnJfxSuw18LboYzuiXYyhN00ccjuNgt6w7hxeZ92amoGeY94oBfQZj8t856gKg dBUw== MIME-Version: 1.0 X-Received: by 10.182.79.165 with SMTP id k5mr11299109obx.24.1366523860119; Sat, 20 Apr 2013 22:57:40 -0700 (PDT) Received: by 10.60.63.74 with HTTP; Sat, 20 Apr 2013 22:57:39 -0700 (PDT) Date: Sat, 20 Apr 2013 22:57:39 -0700 Message-ID: Subject: Re: Compilation From: "Carlos E. Torchia" To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2013 05:57:46 -0000 Hey Michal, if you still subscribe, I know this was a very long time ago, but this has been bugging me so I want to thank you for your advice. This was 9 years ago. Ultimately I just had a lot to learn. Besides not staying up all night to solve dependency issues and writing to mailing lists in an upset tone. I'm sorry about that. I was 17 at the time. I think I read your response, but then I gave up on my project to make my own open source RPG at the time. In some way I just wanted to get the job done. I looked at the PyGTK link you posted. It looks like a pretty direct way to get started doing drawings. A lot of other things would be involved with an RPG, including sound, animations, and AI. It's also good advice to not get frustrated, too. Thanks, Carlos On Wed, Jul 21, 2004 at 01:16:20 PDT, Michal Pasternak < michal@pasternak.w.lub.pl> wrote: > Carlos Torchia [Wed, Jul 21, 2004 at 06:02:43AM +0100]: > >* Hi. I can't compile a program using the G2 graphics*>* library. When= I tried compiling the program the first*>* time, cc said it didn't know th= at g2.h was in*>* /usr/local/include, which I think is pretty stupid.*>* An= yway, I put /usr/local/include and /usr/local/lib in*>* the -I and -L param= eters respectively.* > Yes, that's correct. You need to pass -I and -L each time you compile a > program, that has its libs / includes not in /usr/{lib,include} . > > There are 3 options: use Linux (which has almost everything in /usr/inclu= de > and /usr/lib, but you still have to pass -I and -L sometimes, for postgre= sql > for example); symlink all files in /usr/X11R6/{lib,include} and > /usr/local/{lib,include} in your /usr/{lib,include} - which will clobber = up > your filesystem a bit; learn to write / use Makefiles or pkg-config stuff= . > > For example, you could write Makefile like: > > myprogram: myprogram.c > $(CC) -o myprogram `gtk-config --libs --cflags` myprogram.c > > >* Then it saw*>* the header and library files, but there were constant*>= * errors saying that there were undefined references to*>* X11 functions wi= thin libg2.a.* > Aye! That's why you specify -L/usr/X11R6/lib -lX11 and some more stuff on > gcc command line. > > Too hard, too complicated, takes too much time? Well. Either write a good > makefile, or try to learn some IDE for GCC (anjuta, kdevelop), which can > propably take care of this automatically. I think, that learning > automake/autoconf (the scripts, that generate "configure" script, that > autodetects library locations) can be hard/unneeded for you at the moment= . > > >* and how to redirect error output from*>* programs to files (or pipe th= em), because everything I*>* need to now about Unix or FreeBSD comes from 7= 2 hours of*>* trying to figure out how to make a directory or something.* > Google is your friend:http://www.bo.infn.it/alice/alice-doc/mll-doc/usrgd= e/node18.html > > >* I'm sorry, but I just can't do anything in this operating*>* system. = I mean, finally I've found a library that makes*>* it simple to simply plot= a pixel in a window without*>* spending hours looking for a GTK tutorial t= hat will tell*>* me about this stupid graphics context stuff that I don't*>= * even know. And now I gotta figure out about this stupid*>* g2 thing. Ok= . Well anyway, thanks for any help you can*>* give me.* > If you just want to "get the job done", I'd suggest Python. You don't car= e > about compilation, libraries, other stuff - and it is extremely simple to > draw stuff using PyGTK -http://www.moeraki.com/pygtktutorial/pygtk2tutori= al/ch-DrawingArea.html > > If "graphics context" stuff bothers you, well, that's somehow "standard" = way > to draw stuff, well, X has it and win32 also has it :) If you want to use > something like a framebuffer, I am sure you can find something, no matter= if > in GTK or X11 (I'd suggest XSHM extension for framebuffer-like stuff, but > well, I've written my last pure-X11 application about 5 years ago, and I'= m > sure, that things have changed). > > Hope this helps. Don't get frustrated - spend another 72 hours actually > reading the docs, unix is simple, but sometimes not as simple, as you may > suppose :) > -- > m > >