code logs -> 2010 -> Sat, 09 Oct 2010< code.20101008.log - code.20101010.log >
--- Log opened Sat Oct 09 00:00:13 2010
00:00 You're now known as TheWatcher[T-2]
00:03 You're now known as TheWatcher[zZzZ]
00:08
< Anno[Laptop]>
I'm trying to compile something.
00:08
< Anno[Laptop]>
/usr/bin/ld: cannot find -lX11
00:08
< Anno[Laptop]>
How do I fix this?
00:09
< celticminstrel>
Where is libX11.so?
00:10
< Anno[Laptop]>
/usr/lib/libX11.so.6
00:10
< Anno[Laptop]>
/usr/lib/libX11.so.6.2.0
00:10
< celticminstrel>
I dunno if the 6 at the end would be a problem or not...
00:11 cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code
00:11
< celticminstrel>
So, I just discovered something interesting and slightly odd. The SDL_RWops structure has a member Uint32 type, but I just checked the source and it's not used for anything.
00:12
< gnolam>
Anno[Laptop]: is it in the library path?
00:12
< gnolam>
Oh wat
00:12
< gnolam>
*wait
00:12
< gnolam>
It was in /usr/lib
00:12 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
00:13 mode/#code [+o ToxicFrog] by Reiver
00:13
< celticminstrel>
So, in principal, a customized RWops does not need to use the "unknown" union member; they could use the mem or stdio members instead.
00:13
< Anno[Laptop]>
gnolam: Does that mean it doesn't have to be in ./lib/?
00:14
< celticminstrel>
You could try adding -L/usr/lib though I doubt that /usr/lib would not be in the path.
00:17
< Anno[Laptop]>
/usr/bin/ld: cannot find -l/usr/lib/X11
00:18
< Anno[Laptop]>
Okay, I changed it back to -lX11, then altered it to -LX11... then it works!
00:18
< Anno[Laptop]>
Up until it spews out errors much later.
00:24 * Anno[Laptop] notices:
00:24
< Anno[Laptop]>
# This is not a very "nice" Makefile, but it usually works.
00:24
< Anno[Laptop]>
No shit, guys.
00:53 Anno[Laptop] [annodomini@Nightstar-926ff7b8.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
00:55 Attilla [Some.Dude@Nightstar-efc09491.threembb.co.uk] has joined #code
00:55 mode/#code [+o Attilla] by Reiver
01:21 Derakon[AFK] is now known as Derakon
01:23 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
01:43 Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code
01:57 Attilla [Some.Dude@Nightstar-efc09491.threembb.co.uk] has quit [[NS] Quit: ]
02:27 Derakon is now known as Derakon[AFK]
02:35 Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has quit [Ping timeout: 121 seconds]
02:46 Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code
03:48 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
05:53 Derakon[AFK] is now known as Derakon
06:03 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds]
06:23 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:59 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:02 kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has quit [Ping timeout: 121 seconds]
07:10 kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has joined #code
07:23 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
07:51 * Vornicus-Latens gives kaura http://pastebin.starforge.co.uk/420
07:51 * Vornicus-Latens then seriously considers going back to bed.
07:53
< kaura>
Yay, stuff. Night, Vorn.
07:53
<@Vornicus-Latens>
oh, two things you need to make that I can describe right now. Well, okay, actually one make and one change.
07:54
<@Vornicus-Latens>
You see how the unary operators look exactly like the binary ones, in terms of the strings involved?
07:54
<@Vornicus-Latens>
You need to change that in that dictionary. Change it from, for instance, "+", to "u+" or "1+" or something
07:55
< kaura>
Alright, no problem.
07:55
<@Vornicus-Latens>
Then you need to make a dictionary that has those changes, like this: "+": "u+"
07:57
<@Vornicus-Latens>
Reason being, both kinds of operators will be in the same pile, and we want to be able to tell the difference between them. What we'll do is, as we walk through the list of symbols, we'll change operators that are actually the unary versions to those other strings.
08:01
<@Vornicus-Latens>
Another thing we have to build is a dictionary that gives each operator a list of operators that it's later in the order of operations than. So "+" will have (among other things) "*" in its list because addition is later in the order. But we'll handle that when I'm not totally gone and full of soreness after moving a ton of wood.
08:01
< kaura>
So the dictionaries end up looking like?: http://pastebin.starforge.co.uk/421
08:02
< kaura>
...what were you moving a tonnage of wood around for? O_o
08:03
<@Vornicus-Latens>
Helped dad with some yard work and dealing with unruly trees.
08:03 Derakon is now known as Derakon[AFK]
08:03
< kaura>
Ach. Damn trees. Can't trust the shifty, bristly buggers.
08:04
<@Vornicus-Latens>
And yes, precisely.
08:34 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
08:38 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
10:15 Attilla [Some.Dude@Nightstar-40f877bb.threembb.co.uk] has joined #code
10:15 mode/#code [+o Attilla] by Reiver
10:33 Anno[Laptop] [annodomini@Nightstar-f61ded15.adsl.tpnet.pl] has joined #code
10:36 You're now known as TheWatcher
10:57 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
11:06 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code
11:16 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
13:19 You're now known as TheWatcher[afk]
13:28 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
13:37 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
14:41 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
15:43 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
15:46 You're now known as TheWatcher
16:54 aoanla [AndChat@Nightstar-c3af749c.range217-43.btcentralplus.com] has joined #code
17:15 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
17:22 Vornicus-Latens is now known as Vornicus
17:46
< Anno[Laptop]>
Help! I'm trying to use switch() to handle Strings, but Java is not letting me. It's telling me to enable source 7 or something, but I no understand!
17:48
< simon_>
Anno[Laptop], http://www.ensta.fr/~diam/java/online/notes-java/data/strings/12stringcomparison .html
17:50
< celticminstrel>
Java doesn't support Strings in switch until JDK7, which is not yet "official".
17:51
< celticminstrel>
(Current version is 6.)
17:51
< Anno[Laptop]>
Ah, I see.
17:51
< Anno[Laptop]>
Well, I've already converted the offending code to if-else.
17:51
< celticminstrel>
Okay.
17:51
< Anno[Laptop]>
Thanks.
18:53
< celticminstrel>
...wait, cplusplus.com says that scanf returns the number of items read. What does it mean by "items"?
18:54
< celticminstrel>
Is it characters read, or something more like a count of how many format specifiers were matched?
18:55
<@Vornicus>
Pretty sure it's the latter.
19:01
< celticminstrel>
Argh.
19:01
< celticminstrel>
Quick test confirms this, too.
19:13 Derakon[AFK] is now known as Derakon
19:22
< celticminstrel>
I'm trying to figure out how to determine how many characters sscanf consumes. <_<
19:23
<@ToxicFrog>
celticminstrel: look for the %n format.
19:27
< celticminstrel>
Interesting; that's not actually listed on the scanf page on cplusplus.com (though it's on the printf page), but I just tested it and it worked.
19:38 kwsn [kwsn@31356A.5FD175.2259B6.DFACD4] has joined #code
21:07 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
21:10
< Anno[Laptop]>
Anyone know how to generate a JAR file from a Netbeans project (in Netbeans, that is; I could try to remember how to do that by hand, but eh)?
21:10
< celticminstrel>
Isn't a jar just a zip archive?
21:10
< celticminstrel>
And no, I've never used Netbeans.
21:11
< Anno[Laptop]>
Yes, it is. That's why I said I can, possibly, do it by hand. But it's fiddly, and I'm not sure I want to.
21:11
< celticminstrel>
My suggestion would be to check all the menus in great detail. <_<
21:11 aoanla [AndChat@Nightstar-c3af749c.range217-43.btcentralplus.com] has quit [[NS] Quit: ]
21:14
<@ToxicFrog>
Doing it by hand is a lot less fiddly if you use the 'jar' command rather than renaming a zip file.
21:14
<@ToxicFrog>
I realize this doesn't actually answer the question, though.
21:17
<@ToxicFrog>
Also, Anno[Laptop], concerning your earlier -l/-L stuff
21:19 Stalker [Z@5E691D.FC7C16.75EF63.710A88] has joined #code
21:20
< Anno[Laptop]>
Okay, I found that I need to press the Build button, rather than Run, because the jar building is disabled when compile on save is enabled.
21:20
< Anno[Laptop]>
ToxicFrog: Yes?
21:20
<@ToxicFrog>
-lfoo is "link against foo by looking for files named libfoo.{a,so} in the library search path"; -Lfoo is "add foo to the library search path"
21:21
<@ToxicFrog>
So, -l/usr/lib/X11 won't work, but -L/usr/lib/X11 -lX11 is probably what you were after.
21:21
< Anno[Laptop]>
(I managed to install the app I wanted to compile after I found it in the sid non-free repository.)
21:21
<@ToxicFrog>
(which combined will correctly pick up /usr/lib/X11/libX11.so)
21:23
< Anno[Laptop]>
Mhm.
21:23
< Anno[Laptop]>
Hmmmm. How do I run a JAR under Linux?
21:23
<@ToxicFrog>
java -jar foo.jar
21:23
<@ToxicFrog>
Or just double-click on it
21:23
< Anno[Laptop]>
Double clicking no worky, because of Archive Manager.
21:24
< Anno[Laptop]>
Okay, it runs.
21:25
< Anno[Laptop]>
But that's all it does. I see no components on my custom frame. :E
21:26
<@ToxicFrog>
Right-click, "Open with <name of your Java runtime here>"
21:26
<@ToxicFrog>
Eg, for mine it's "Open with Sun Java 6 Runtime
21:27
< Anno[Laptop]>
That shows up as available, meaning installable.
21:27
< Anno[Laptop]>
Hmm. Second time I try to run the jar, it hangs.
21:28
< Anno[Laptop]>
For some reason, I can run it fine from the IDE, but not the JAR.
21:29
< Anno[Laptop]>
It looks slightly different before it crashes. Could it be that different versions of Java are somehow being used here?
21:29
<@ToxicFrog>
Could be
21:30
<@ToxicFrog>
The IDE may be using its own JVM rather than the system one
21:31
< celticminstrel>
Does it tell you what caused the crash?
21:31
< Anno[Laptop]>
No, it just hangs.
21:31
< celticminstrel>
Or wait, you said hangs, meaning doesn't respond.
21:32 * Anno[Laptop] goes install the newest Java.
21:34 Stalker [Z@5E691D.FC7C16.75EF63.710A88] has quit [Ping timeout: 121 seconds]
21:41
< Anno[Laptop]>
Huh. Using 'java -jar file.jar' fails, but the Java 6 Runtime DOES.
21:44
< Anno[Laptop]>
Hmmm.
21:44
< Anno[Laptop]>
I have a problem with directories. I want the program's working directory to be the directory where the JAR is.
21:44
< Anno[Laptop]>
How can I do this?
21:59 Stalker [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
21:59
< simon_>
Anno[Laptop], that's not the definition of CWD.
22:00
< Anno[Laptop]>
Well, I want the thing to start in the place where the JAR is.
22:00
< Anno[Laptop]>
In Windows, it does that. Here, it starts in ~,
22:00
< Anno[Laptop]>
*.
22:02
< simon_>
Anno[Laptop], by googling a little around, it seems that there is System.setProperty("user.dir", "C:\\");
22:03
< simon_>
http://www.devx.com/tips/Tip/13804
22:03
< simon_>
oh, shrug. it's read-only.
22:04
< simon_>
but then again, in the comments it says that setting the property will work.
22:04 * Anno[Laptop] also shrugs. It works after a fashion.
22:04
< simon_>
who knows? :)
22:04
< Anno[Laptop]>
My program, I mean, not this solution.
22:24 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
22:43
<@ToxicFrog>
Anno[Laptop]: generally, when releasing as a jar, you avoid needing that by storing all of the program's data in the jar itself.
22:47
< Anno[Laptop]>
But what if I want the user to be able to manipulate that data? In this case, the data is a text template which can be modified to suit the user. Also, it would probably be better for the user to be able to easily find where the output file will appear.
22:48
<@ToxicFrog>
Then by putting it in the program directory you are doing it wrong on both linux and windows.
22:49
< Tarinaky>
the Windows way is %HOME%\Application Data iirc. >.>
22:49
<@ToxicFrog>
Yeah, although generated user-facing files could plausibly go in My Documents (or, hell, just ask)
22:54 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited]
22:59
<@TheWatcher>
Tarinaky: it's rather mote complicated than that
22:59
< Tarinaky>
TheWatcher: Depends which version of Windows, I know >..
22:59
< Tarinaky>
Although there's a variable you can test for that >.>
23:00
<@TheWatcher>
Tarinaky: also, data that should be shared across roaming profiles should go in Application Data, while data that should not should go in Local Settings\Application Data
23:00
<@TheWatcher>
Something like that, anyway, Microsoft have some convoluted spec for it
23:01
< Tarinaky>
To be fair, the spec for where different types of programs should be installed is equally convoluted on UNIX/Linux x
23:01
< Tarinaky>
*:x
23:02
< Tarinaky>
/usr, /usr/local, /opt/...
23:39 You're now known as TheWatcher[T-2]
--- Log closed Sun Oct 10 00:00:15 2010
code logs -> 2010 -> Sat, 09 Oct 2010< code.20101008.log - code.20101010.log >