code logs -> 2008 -> Wed, 17 Dec 2008< code.20081216.log - code.20081218.log >
--- Log opened Wed Dec 17 00:00:03 2008
00:03
<@McMartin>
The best thing ever were the hot shit programmers who didn't know C doesn't have a boolean type.
00:03
<@McMartin>
That was basically when I abandoned the site entirely~
00:04
<@Consul>
Hell, I knew that. :-P
00:05
<@Consul>
My C++ instructor spent a good deal of time explaining that, actually, as an example of how to use typedefs
00:05
<@Consul>
Or rather, as an example of how they got used.
00:26 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
00:26 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
01:05 AnnoDomini [~farkoff@Nightstar-29612.neoplus.adsl.tpnet.pl] has quit [Quit: I like maxims that don't encourage behaviour modification.]
02:11 You're now known as TheWatcher[zZzZ]
02:38 Derakon [~Derakon@Nightstar-4920.hsd1.ca.comcast.net] has joined #code
02:38 mode/#code [+o Derakon] by ChanServ
03:57 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
04:15 * Vornicus fiddles with the new puzzle-* game, dominosa. Given a grid of numbers, figure out how to put a set of unique dominos to match.
04:15
< Vornicus>
It is amazingly difficult.
04:16
<@Derakon>
So it's basically like a classic "make the picture" puzzle except that you use pairs of numbers instead of shape, color, etc.?
04:16 mode/#code [+oooovv Alek|gone C_flying_tiger crem Vornicus grossroot[idle] Pink] by Vornicus
04:17
<@Vornicus>
http://www.puzzle-dominosa.com/?size=0
04:17
<@Vornicus>
You have to cover every square; each pair of numbers you connect must be distinct, like you would find in a normal set of dominos.
04:18
<@Derakon>
Does it...tell you when you've finished it successfully?
04:18
<@Vornicus>
Click the "ready" button
04:19
<@Derakon>
I don't think I made a mistake.
04:19
<@Derakon>
Ahh.
04:22
<@Derakon>
Okay, the 3x3's straightforward.
04:23
<@Vornicus>
They've also got a bunch of other ones on there. Loop (make a single loop of lines so that each square with a number has that number of edges around it), Nurikabe (make a bunch of white islands in a black sea with particular criteria), and rectangles (make a bunch of rectangles such that each one has one number in it, and that number is the rectangle's area)
04:24
<@Vornicus>
are my favorites.
04:24
<@Vornicus>
then there's a lights thing, a paint-by-numbers thing, and sudoku.
04:24
<@Vornicus>
Oh, and - this game says you can use right click to set a red line but on safari it's shift-click.
04:50 * Derakon tightens the screen down to 900x650, moves the help to its own mode, and implements "start new game".
04:54
<@Derakon>
Time for a new release. http://derakon.dyndns.org/~chriswei/temp/puzzle7.tgz
04:57 * Vornicus downloads.
04:58
<@Vornicus>
I'm getting a "pop" each time I make a thing, instead of any particular noise.
04:58
<@Derakon>
...d'oh!
04:58
<@Derakon>
Forgot the sound effects!
04:59
<@Vornicus>
heh
05:00
<@Derakon>
Fixed.
05:00
<@Derakon>
I have to add the assets back in manually after running the Python-to-app program, and the SFX assets are new this release, so my little shell script didn't know about them yet.
05:02 * Derakon vaguely wonders if Pygame games can run on the iPhone.
05:02
<@Derakon>
I'm sure there's a total glut of little puzzle games on there, of course.
05:03
<@Vornicus>
Ooooh.
05:03
<@Vornicus>
I like the sounds
05:03
<@Derakon>
Danke.
05:04
<@Vornicus>
They give a lot of polish.
05:04
<@Derakon>
Did you ever play an old Columns clone called Jewelbox?
05:04
<@Derakon>
This would've been OS 7, 8, or thereabouts.
05:04
<@Vornicus>
nopers.
05:04
<@Derakon>
It had similar chimes for matching.
05:08
<@Derakon>
So what remains? I need to polish the help page -- get a different font and have some images on there. I need to track high scores.
05:08
<@Derakon>
I need to rework the scoring mechanism, and probably multiply everything by 10.
05:09
<@Derakon>
Anything else you can think of?
05:12
<@Vornicus>
Need the go button to be bigger and labeled.
05:12 * jerith tries the puzzle.
05:12
<@Derakon>
Ahh, right.
05:12
<@Vornicus>
A click should also start a new game.
05:13
<@Derakon>
The help page in general needs a little attention. I threw it together pretty quickly.
05:16 * Vornicus exercises the full range of the sound effects.
05:16
<@Derakon>
I was thinking of maybe replacing them with a chord progression.
05:17
<@Derakon>
The current system only uses four tones, in part because I was still figuring out how GarageBand et al worked and didn't want to get too complicated.
05:18
<@Vornicus>
Oh, here. have like three notes for each item in your progression (say, the tonic chord in each mode), and play one for when you hit one match, two for when you hit two matches, etc
05:18
<@Derakon>
I'm not certain I understand that. Example?
05:19
<@Vornicus>
Say you hit one match. It'll play C.
05:19
<@Vornicus>
Two simultaneous matches and it'll play C-E
05:19
<@Vornicus>
Three and it plays C-E-G
05:20
<@Derakon>
Ahh. You want tracking of the number of lines matched at any given time.
05:20
<@Vornicus>
Ye
05:20
<@Vornicus>
s
05:20
<@Derakon>
Which would involve a significant rework of the matching logic. >.>
05:20
<@Derakon>
Not a bad idea, though.
05:21
<@Vornicus>
And then go up a step to Dm, then Em, then F, G, Am, Bdim
05:30 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout]
05:31 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
05:31 mode/#code [+o GeekSoldier] by ChanServ
--- Log closed Wed Dec 17 06:06:23 2008
--- Log opened Wed Dec 17 09:07:11 2008
09:07 TheWatcher[zZzZ] [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
09:07 Irssi: #code: Total of 16 nicks [13 ops, 0 halfops, 2 voices, 1 normal]
09:07 mode/#code [+o TheWatcher[zZzZ]] by ChanServ
09:07 Irssi: Join to #code was synced in 51 secs
09:10 You're now known as TheWatcher
09:14 Vornicus is now known as Vornicus-Latens
10:02 AnnoDomini [~farkoff@Nightstar-29304.neoplus.adsl.tpnet.pl] has joined #Code
10:02 mode/#code [+o AnnoDomini] by ChanServ
11:34 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
11:34 mode/#code [+o gnolam] by ChanServ
12:24
<@Serah>
http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html <- This is actually remarkably entertaining.
12:28 C_flying_tiger is now known as C_tiger
12:29 C_tiger is now known as NSGuest-558
12:30 NSGuest-558 is now known as C_tiger
12:50
<@AnnoDomini>
Serah: LOL.
13:01
<@TheWatcher>
Um, wait
13:02
<@TheWatcher>
"C... restrictive" erm...
13:02
<@TheWatcher>
Meh *shrug*
13:02
<@AnnoDomini>
Isn't it?
13:03
<@TheWatcher>
No
13:04
<@TheWatcher>
This is, in fact, one of the reasons people don't like C: it gives you enough rope to hang yourself, your friends, and their families and gives you a large array of instructional ways to hang them all in novel and curious manners
13:48
<@gnolam>
Also, Python should definitely be something with a more rigid ruleset than "humanism". It enforces indentation, FFS.
14:33 grossroot[idle] is now known as grossroot
14:57 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
14:57 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
17:11 You're now known as TheWatcher[afk]
18:06
<@McMartin>
TW: C is "restrictive" in that it does not *permit* a wide variety of abstractions that some architects depend on.
18:06
<@McMartin>
It's restrictive the way people will call Java "restrictive" for not permitting multiple inheritance.
18:06
<@McMartin>
Instead of for not permitting reinterpret_cast, which is an actual restriction.
18:19 You're now known as TheWatcher
19:25 Syloqs_AFH [~Syloq@Admin.Nightstar.Net] has joined #code
19:27 Syloqs_AFH is now known as Syloqs-AFH
20:44
<@gnolam>
Ach. Brain damage. I come across an article on the BBC called "Drillers break into magma chamber"... and my first thought is "Digging designation canceled: Warm stone located".
20:44
<@ToxicFrog>
Pfft
20:45
<@AnnoDomini>
What.
20:46
<@ToxicFrog>
AnnoDomini: Dwarf Fortress
20:47
<@AnnoDomini>
I see.
20:47
<@AnnoDomini>
I tried playing that, but found myself stumped at the interface.
20:48
<@ToxicFrog>
The interface is widely considered by everyone, including the developer, to be a piece of shit.
20:48
<@gnolam>
Yes. It's the Roguelike equivalent of Blender.
20:48
<@Consul>
Ooh, them's fightin' words in the wrong place. :-)
20:49
<@AnnoDomini>
Should I be worried that Boost Jam reported that 110 targets could not be updated?
20:49 * AnnoDomini is trying to install that.
20:50
<@ToxicFrog>
...Boost Jam?
20:51
<@gnolam>
A C++-flavored preserve?
20:51
<@AnnoDomini>
http://www.mpi-inf.mpg.de/~dfischer/manual/manual_topic38.html#topic41 <- I'm trying to follow these directions.
20:52
<@ToxicFrog>
Oh my god.
20:52
<@ToxicFrog>
You're doomed.
20:53
<@AnnoDomini>
Explain. I'm on a grand quest to learn C++, undertaken whenever I have extended free time (about twice a year).
20:54
<@gnolam>
Get a pre-built Boost or skip Boost altogether.
20:55
<@gnolam>
Building it yourself is the kind of undertaking where the checklist goes something like "Configure, Make, Cyanide Pill".
20:55
<@gnolam>
It used to be anyway.
20:55
<@Alek|gone>
pfft
20:55
<@gnolam>
Don't really know how it is nowadays.
20:55
<@Alek|gone>
never heard of boost. what is it?
20:55 * AnnoDomini is interested in the explanation too.
20:56
<@gnolam>
A collection of open source libraries for C++. STL on steroids, sort of.
20:56
<@AnnoDomini>
What's it good for?
20:56
<@ToxicFrog>
Heavy template-based, too, which means the slightest misstep will result in kilobytes of unreadable error messages.
20:57
<@gnolam>
And ungodly build times.
20:57
<@gnolam>
AnnoDomini: Huh! Absolutely Nothing!
20:57
<@ToxicFrog>
Nah, it has uses.
20:57
<@gnolam>
... sorry. Had to.
20:57
<@ToxicFrog>
I don't know what they are because I don't use C++ except for systems programming, but they exist.
20:57
<@ToxicFrog>
Anyways. I actually said "you're doomed" because of seeing WX in there.
20:58
<@ToxicFrog>
Since wx, despite its pretensions, is not a GUI toolkit; it's a library for exercising the compiler's error reporting mechanisms.
20:58
<@gnolam>
As I said, it's basically STL on steroids. Want some kind of weird-but-known data structure that's not in the STL? It's probably in Boost.
20:58
<@gnolam>
ToxicFrog: actually, I had no problems building wx myself. It was successfully building programs /using/ wx that was hard.
20:59
<@ToxicFrog>
gnolam: yes, and this is a program using wx.
20:59
<@ToxicFrog>
So.
20:59
<@AnnoDomini>
Alright. No skin off my nose.
20:59
<@ToxicFrog>
AnnoDomini: anyways, while I appreciate the sentiment, learning C++ by diving straight into the Build System From Hell is less likely to result in improved knowledge of C++ than it is to result in frustration and confusion.
21:00
<@ToxicFrog>
(also, this program seems to be written partly in OCaml, too)
21:00
<@AnnoDomini>
You know, what always interested me about programming were games. Funny thing how I've managed to get closer to that in VHDL and x86 assembler than C/C++.
21:02
<@ToxicFrog>
Tried C+SDL?
21:02
<@gnolam>
Well, as it happens I'm always on the lookout for suckers^W game coding partners, so... ;-)
21:03
<@ToxicFrog>
Although, really, I'd recommend Python+PyGame or Lua+LuaGame (or lsdl or whatever I'm calling it today) unless you know those aren't performant enough for your needs.
21:04
<@Alek|gone>
how about Flash?
21:04
<@Alek|gone>
¬_¬
21:04
<@Alek|gone>
or actually, Visual Basic or Visual C?
21:04
<@ToxicFrog>
Well, yes, if you hate yourself and all of your users~
21:04 * gnolam slaps Alek|gone.
21:04
<@Alek|gone>
there's TONS of awesome Flash games on the webs.
21:04
<@AnnoDomini>
There is a use for Flash.
21:05
<@AnnoDomini>
It makes good battle maps for play by forum RPGs.
21:05
<@gnolam>
It wasn't the Flash suggestion. It was the Visual Basic.
21:05
<@ToxicFrog>
Alek|gone: yes. And every single one has taken a terrible toll in sanity on the person who wrote it, while at the same time being unplayable on 64-bit systems.
21:05
<@Alek|gone>
pfft.
21:05
<@gnolam>
64-bit Flash is available now, isn't it?
21:05 * AnnoDomini goes bathe.
21:05
<@ToxicFrog>
gnolam: Adobe's been promising it for ages. It has yet, AFAICT, to materialize.
21:06 * gnolam checks.
21:06
<@gnolam>
Ah, no stable version.
21:07
<@gnolam>
But there's an unstable official version.
21:07
<@Alek|gone>
problem is, it's unstable.
21:07
<@Alek|gone>
wanna REALLY hate yourself?
21:07
<@Alek|gone>
program a game in COBOL.
21:07
<@ToxicFrog>
The "stable" version is unstable enough, I'm not sure I want to see what Adobe considers unstable.
21:07
<@gnolam>
Heh.
21:08 * Alek|gone had to learn it in school. at least 2 semesters' worth.
21:08
<@Alek|gone>
it was a fricking DEGREE REQUIREMENT.
21:09
<@gnolam>
Did you pray to the Lords of COBOL?
21:10
<@gnolam>
(It's the one thing in the new BSG I can't stop giggling about)
21:10
<@ToxicFrog>
?
21:10 * ToxicFrog moves showerwards
21:12
<@Alek|gone>
haven't seen BSG, new or old. >_>
21:13
<@gnolam>
Ah. In Battlestar Galactica, they pray to the "Lords of Kobol".
21:13
<@gnolam>
And I can't help but imagine those deities as fat men in Thinkgeek T-shirts and DBA beards.
21:14
<@McMartin>
An awful lot of the indie non-programmed games I've played and enjoyed were in MMFD.
21:20
<@AnnoDomini>
ToxicFrog: What is C+SDL, what's it good for, and where can I get it with the minimum of fuss for MinGW?
21:20
<@ToxicFrog>
C is C.
21:21
<@ToxicFrog>
SDL is the Simple DirectMedia Layer, a library for doing graphics/sound/keyboard/mouse/window management/joystick/etc with a consistent interface across a wide variety of systems.
21:21
<@gnolam>
I find it rather limited and convoluted though.
21:21
<@gnolam>
(SDL. Not C.)
21:21
<@ToxicFrog>
It's good for writing 2d, 3d software or 3d openGL games that will then build on damn near everything.
21:21
<@AnnoDomini>
gnolam: Do you actually like anything?
21:21
<@gnolam>
Beer.
21:21
<@ToxicFrog>
MinGW has an official SDL package on their sourceforge site, precompiled.
21:22
<@gnolam>
Or well... not really limited, but a bit too low-level at times.
21:22
<@ToxicFrog>
There's a bunch of subsidiary libraries (SDL_Mixer, SDL_Net, SDL_Image and SDL_gfx) you may want as well; I believe these are also available, but if not I have windows binaries of Image (image loading in a variety of formats) and gfx (graphical primitives, image filters and bitmapped 8x8 text) lying around.
21:23
<@ToxicFrog>
gnolam: this is by design.
21:23
<@ToxicFrog>
Allows you to build the features you need on top of it. Cf all the SDL_* libraries mentioned above.
21:23
<@AnnoDomini>
Wait, this is for C or C++?
21:23
<@ToxicFrog>
C, although there's a bunch of C++ wrappers available from it
21:23
<@ToxicFrog>
And of course you can call C libraries from C++
21:24
<@ToxicFrog>
*available _for_ it
21:24
<@ToxicFrog>
libsdl.org is the official site.
21:25
<@AnnoDomini>
How easy is it to, say, change the display mode to something, and then draw a pixel of a certain colour in a certain spot?
21:26
<@ToxicFrog>
screen = SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN);
21:26
<@ToxicFrog>
pixelColor(screen, x, y, 0xFF0000FF)
21:26
<@AnnoDomini>
Yay. :D
21:26
<@ToxicFrog>
http://www.libsdl.org/cgi/docwiki.cgi/SDL_API http://www.ferzkopp.net/joomla/content/view/19/14/
21:27
<@AnnoDomini>
It has documentation. :D
21:28
<@gnolam>
If you want something more high level, I hear good things about SFML: http://www.sfml-dev.org/features.php
21:28
<@ToxicFrog>
The latter function is from SDL_gfx, incidentally; with raw SDL it would be something like: ((uint32_t*)screen->pixels)[y*screen->w+x] = 0xFF0000FF, since what SDL gives you is a void* to the surface pixel data and that's it.
21:28
<@ToxicFrog>
Which is why we have the _gfx library.
21:29
<@McMartin>
Actually, with Raw SDL I'd do SDL_FillRect with a 1x1 rect.
21:29
<@McMartin>
That way I don't have to lock the surface.
21:29
<@gnolam>
And if "incredibly easy" and "everything but the kitchen sink" are priorities but a consistent API and freedom from legacy stuff isn't, there's Allegro: http://www.sfml-dev.org/features.php
21:29
<@McMartin>
Don't forget "actually builds" not being a priority.
21:30
<@ToxicFrog>
McMartin: ok, point
21:30
<@gnolam>
For what?
21:31
<@McMartin>
gnolam: My experience with Allegro is distressingly similar to my experiences with wxWidgets.
21:31
<@gnolam>
Oh? I've never failed with it. :)
21:31
<@AnnoDomini>
gnolam: I'll take documentation over easy.
21:32
<@McMartin>
(Also, if you want to deliberately inflict consolitis on your SDL program, VControl will Do What You Need)
21:32
<@gnolam>
All of those I mentioned have decent to really good documentation.
21:33
<@AnnoDomini>
I'm having difficulty concentrating. It must be due recent KM.
21:34
<@gnolam>
(Say what you want about PHP BTW, but its annotated documentation is a stroke of brilliance)
21:36
<@McMartin>
(I'm also a fan of Python's three-layer docs)
21:40
<@AnnoDomini>
http://www.netadelica.com/coding/sdl/install.html <- Does this contain relevant instructions? I'm personally stumped by "When you compile an SDL program you need to execute the file sdl-config on the compilation line (more below)." - I can't make sense of that sentence.
21:40
<@McMartin>
Does MinGW understand backtick?
21:40
<@McMartin>
In Linux, you tend to do, like...
21:40
<@gnolam>
No. That's a shell thing.
21:41 grossroot is now known as grossroot[idle]
21:41
<@McMartin>
"Does MinGW include a shell that understands backtick?"
21:41
<@McMartin>
gcc -c `sdl-config --cflags` -o test.o test.c
21:41
<@gnolam>
I believe MSYS does.
21:41
<@McMartin>
I suspect you'll have to do something in your makefile to do the equivalent, if so.
21:41
<@McMartin>
Or rather, if not.
21:41
<@McMartin>
If so, you just backtick and be done with it.
21:46
<@AnnoDomini>
Let me get this straight. I need to a) download the MinGW version of the SDL development library, b) download 110 of Unix functions I don't have hard drive space for, c) use these functions to configure what I extract from the archive, d) compile the thing.
21:46
<@AnnoDomini>
Yes?
21:46
<@McMartin>
I doubt it.
21:46
<@McMartin>
It should be (a) You already have make, gcc, &c, because like you said you had MinGW
21:47
<@McMartin>
(b) SDL.a, SDL.so, and sdl-config should all be part of the MinGW package
21:47
<@McMartin>
(c) See (b)
21:47
<@McMartin>
(d) Should be already compiled. SDL-config is for when you compile *your* stuff
21:47
<@McMartin>
The easiest way to do it is to find a DJGPP tutorial, though, I bet; Look through the tutorial pages for Marus's.
21:48
<@McMartin>
That was how I learned SDL back in the day.
21:48
<@McMartin>
That should also step-by-step it *and* give you an IDE that handles all the bullshit for you.
21:48
<@AnnoDomini>
Wait, wait. I need to configure it whenever I want to compile anything?
21:48
<@McMartin>
No
21:49
<@McMartin>
You need to configure *your program* to tell it *where SDL is*.
21:49
<@McMartin>
sdl-config --cflags just prints out something like "-IC:\SDL\SDL-1.2.11\include" or whatnot.
21:49
<@gnolam>
Run it once and note its output.
21:50
<@McMartin>
There is also sdl-config --libs for the stuff to add to making the final executable.
21:50 Vornicus-Latens is now known as Vornicus
21:52
<@McMartin>
If you're working with an IDE (I think DJGPP is the standard one for MinGW) this translates to setting your include/library/DLL directories appropriately, I believe.
21:52
<@AnnoDomini>
I'm not working with an IDE.
21:53
<@McMartin>
Yeah, so, there should be an sdl-config.exe then that will tell you what the flags are to make gcc/g++ find everything.
21:53
<@McMartin>
If not, you'll have to do the -I and -L and -l on your own.
21:54
<@AnnoDomini>
I'll get back to this after I've done something less complex, which is checking a street sam's cyberware for inconsistencies.
21:54
<@ToxicFrog>
Which isn't hard; I've never used sdl-config
21:54
<@ToxicFrog>
Just add -I/usr/include/SDL to the compile line and -lSDL to the link line.
21:55
<@ToxicFrog>
AnnoDomini: er...you have compiled C/++ programs before, yes?
21:55
<@AnnoDomini>
Yes.
21:55
<@ToxicFrog>
Ok, so...where's the confusion?
21:55
<@ToxicFrog>
Put the headers and the libraries for SDL in their usual places, use -I and -L and -l as you always would.
21:55
<@AnnoDomini>
The confusion is that I've apparently been hit on the head one time too many today, and this all looks like gobbledygook to me.
21:57
<@ToxicFrog>
The install instructions you're reading are (1) unecessary convoluted, and (2) shouldn't be necessary if you've ever installed a development library before.
21:58
<@AnnoDomini>
I have never installed a development library before. I've somehow suceeded in installing pdcurses, though.
21:58
<@ToxicFrog>
Aah.
21:58
<@ToxicFrog>
Ok, basic idea then is this.
21:58
<@ToxicFrog>
The library will come with:
21:58
<@ToxicFrog>
- a bunch of .h files. These are the headers, obviously.
21:59
<@ToxicFrog>
They go in your include directory (probably just /include in msys; in linux it would be /usr/include)
21:59
<@ToxicFrog>
- a bunch of .a files. These are the static libraries, used at link time. They go in /lib.
22:00
<@ToxicFrog>
- a bunch of .dll files. These are the dynamic libraries, used at link time and run time (if the linker didn't use the static libraries). They go somewhere in your PATH - /bin, or C:/windows/system32/.
22:00
<@ToxicFrog>
Once you've done this, you can:
22:01
<@ToxicFrog>
- #include <foo.h> as normal
22:01
<@ToxicFrog>
- use "-lwhatever" to link against libwhatever.a or whatever.dll
22:01
<@ToxicFrog>
- if you didn't install them in standard places, you can also use -I/path/to/headers and -L/path/to/libraries to tell the compiler and linker where to find them
22:02
<@ToxicFrog>
pdcurses and SDL are both laid out like this, along with pretty much every other C/++ dev library you'll see.
22:09
<@AnnoDomini>
So, in the archive, I have /include/ wherein I find a directory called "SDL" with some thirty odd files. This directory goes directly to C:\MinGW\include\?
22:10
<@ToxicFrog>
Yep
22:10
<@ToxicFrog>
And then you either:
22:10
<@ToxicFrog>
#include <SDL/whatever.h>
22:10
<@ToxicFrog>
Or:
22:10
<@ToxicFrog>
#include <whatever.h>
22:11
<@ToxicFrog>
and use -Ic:/mingw/include when compiling.
22:11
<@ToxicFrog>
Er
22:11
<@ToxicFrog>
-Ic:/mingw/include/SDL
22:12 * AnnoDomini copies.
22:16
<@AnnoDomini>
I have a trio of .a files in /lib/ within the archive. These go directly, not even in a subfolder, into C:\MinGW\Lib?
22:17
<@gnolam>
Is it a precompiled version you have?
22:17 * gnolam is suddenly haunted by the ghost of George Carlin.
22:18
<@AnnoDomini>
I don't honestly know.
22:22
<@McMartin>
Yes, it is.
22:22
<@McMartin>
It's got .a files.
22:24
<@ToxicFrog>
AnnoDomini: yes, they do, and yes, it is.
22:26 * AnnoDomini copies.
22:28
<@AnnoDomini>
I've found SDL.dll and sdl-config (extensionless) in the /bin/ folder within the archive. The DLL goes into wherever included in PATH?
22:30
<@McMartin>
Yeah. Traditionally, you ship it with whatever your final .exe is.
22:30
<@McMartin>
Stick it in that .exe's directory.
22:30
<@AnnoDomini>
Do I have to do anything with the sdl-config?
22:31
<@McMartin>
Probably not; it just prints stuff out, as noted.
22:31
<@McMartin>
If it's not a .exe it probably is just a leftover from the full Posix builds.
22:35
<@ToxicFrog>
Or a shell script.
22:44
<@AnnoDomini>
http://pastie.org/341809 <- Que?
22:51
<@Consul>
So, f(x)=2x+3 walks into a bar. The bartender says, "sorry, we don't cater for functions."
22:53
<@gnolam>
AnnoDomini: you're not linking with anything.
22:54
<@gnolam>
You'll need something like -lSDL on that command line.
22:55
<@AnnoDomini>
In the options part?
22:56
<@gnolam>
Yes.
22:56
<@gnolam>
Although GCC on Windows at least happily accepts any order.
22:57
<@gnolam>
Although not any linking order, which is fecking annoying.
22:57
<@AnnoDomini>
It just struck me that "g++ -Wall -g -O0 -o -lSDL" really looks like some arcane incantation.
22:57
<@gnolam>
Why even pass -O0? It's the default, innit?
22:57
<@Alek|gone>
well, of course it's an arcane incantation.
22:58
<@Alek|gone>
any pure CLI requires the user to be a wizard.
22:59
<@AnnoDomini>
Uh, it's not working.
22:59
<@AnnoDomini>
Example.exe: No such file or directory
23:01
<@gnolam>
Well, I just noticed that you mangled the -o in your "arcane incantation" example above.
23:02
<@gnolam>
You're trying to output to "-lSDL". :)
23:02
<@gnolam>
So switch the -o and -lSDL around and try again.
23:03
<@gnolam>
(Nice little syntax inconsistency there, GCC!)
23:04
<@AnnoDomini>
nMain@16'
23:04
<@AnnoDomini>
collect2: ld returned 1 exit status
23:04
<@AnnoDomini>
collect2: ld returned 1 exit status
23:04
<@AnnoDomini>
AURGH.
23:04
<@gnolam>
Pastebin it.
23:04
<@AnnoDomini>
http://pastie.org/341834
23:05
<@gnolam>
There's probably some other library file you need to link as well.
23:05
<@AnnoDomini>
I totally feel like a Tech-Priest novice.
23:06
<@gnolam>
Whichever of SDL's files contains its magic main().
23:07
<@gnolam>
Seems to be libSDLmain.a, so -lSDLmain.
23:08
<@ToxicFrog>
Oh yeah, forgot that windows needs that
23:09
<@AnnoDomini>
Same error.
23:10
<@gnolam>
Try switching the order around.
23:11
<@gnolam>
(MSVC does order-independent linking. Why can't GCC?)
23:11
<@AnnoDomini>
With pdcurses, I put -lpdcurses at the end of the incantation.
23:12
<@gnolam>
If /that/ doesn't work, JFG "SDL linking mingw" or something similar.
23:12 Consul [~consul@Nightstar-4909.dsl.sfldmi.ameritech.net] has quit [Operation timed out]
23:12
<@gnolam>
And if it still doesn't work, well, blame SDL.
23:14
<@ToxicFrog>
AnnoDomini: ok, things to check
23:14
<@ToxicFrog>
main() must be declared as exactly: int main(int, char **) or an equivalent signature
23:14
<@ToxicFrog>
In particular, int main(void) won't work.
23:15
<@ToxicFrog>
Your link line should be: -lSDL -lSDLmain -lmingw32
23:16
<@ToxicFrog>
If that doesn't work, stick -mwindows on the end
23:16
<@ToxicFrog>
And if that doesn't work, reverse the order: -lmingw32 -lSDLmain -lSDL -mwindows
23:17
<@ToxicFrog>
And if that doesn't work either, screw it, this is why I do all my development on linux.
23:17
<@gnolam>
-mwindows shouldn't do anything to help the problem (it only gets rid of the console window).
23:17
<@gnolam>
Also, it's deprecated.
23:17
<@ToxicFrog>
gnolam: it shouldn't, but in my experience, sometimes it does.
23:18 * ToxicFrog hugs his cross-compiler
23:20 * gnolam shrugs.
23:20
<@gnolam>
Never had that happen. But then again, MinGW is pretty broken. :P
23:20
<@gnolam>
Anyway. Deprecated in favor of -Wl,--subsystem,windows
23:20
<@AnnoDomini>
"-lmingw32 -lSDLmain -lSDL -mwindows" worked.
23:22
<@AnnoDomini>
It works even without -mwindows.
23:23 Consul [~consul@Nightstar-4909.dsl.sfldmi.ameritech.net] has joined #code
23:23 mode/#code [+o Consul] by ChanServ
23:23 * Consul is beginning to suspect he has some bad ram
23:25
<@Alek|gone>
I KNOW my gig stick is starting to go bad. -_-
23:25
<@Alek|gone>
I desperately need more ram on this machine. >_<
23:25
<@Consul>
I have 2 1-gig sticks
23:25
<@Consul>
Running dual-channel
23:26
<@Consul>
I'm trying to use Devede to create a DVD iso.
23:26
<@Consul>
Everytime I do, something crashes. This last time, the computer locked up and I had to track down the problem.
23:27
<@AnnoDomini>
THE PROGRAM WORKS.
23:27
<@AnnoDomini>
Thanks, guys.
23:33
<@Consul>
Funny thing is, the computer wouldn't post when I reset it after the lock-up.
23:33
<@ToxicFrog>
"no newline at end of file" my entire ass
23:33 * AnnoDomini laughs.
23:33
<@ToxicFrog>
Consul: this is generally the point at which you (1) run memtest86 and (2) pull the bad stick
23:33
<@AnnoDomini>
Why is that even an issue?
23:34
<@Consul>
So I started yanking things, and when I yanked my only PCI card (the sound card), it posted again.
23:34
<@ToxicFrog>
AnnoDomini: well, it's bad form; it causes bad things to happen when catting together files; and at least one version of Half-Life has a bug where if you omit the newline at the end of config.cfg, NPCs will drop dead when you approach them.
23:34
<@Consul>
Then I reinserted said card, screwed it down, and it posted.
23:34
<@Consul>
So it *could* be the card was not well-seated.
23:34
<@ToxicFrog>
The question is why it's complaining about that when there is, in fact, a newline at end of file.
23:35
<@AnnoDomini>
It reminds me of UltraStar bug reports. "The app crashes when you put an extra newline at the end of the lyrics file." "You have no reason to put an extra newline at the end of the files." "But it crashes if you do!" "YOU HAVE NO REASON TO PUT IT THERE!"
23:35
<@ToxicFrog>
In this case it's a warning, and if I didn't habitually build with -Wall it wouldn't even show up.
23:35
<@ToxicFrog>
...aha. That's why.
23:36
<@AnnoDomini>
Uh?
23:37
<@ToxicFrog>
The script that generates surface.h was indenting the last line
23:37
<@ToxicFrog>
So the file ended with \n\t\t rather than \n
23:37
<@AnnoDomini>
I'm sure it's a feature. :P
23:38
<@ToxicFrog>
It is a feature.
23:38
<@ToxicFrog>
Although arguably it should accept files that end with \n followed by whitespace.
23:38
<@ToxicFrog>
s/accept/accept without warning/
--- Log closed Thu Dec 18 00:00:15 2008
code logs -> 2008 -> Wed, 17 Dec 2008< code.20081216.log - code.20081218.log >