Jared’s Blog

October 10, 2005

What am I doing wrong?

Filed under: Computers, Linux, Stupidity — Jared Sutton @ 8:32 pm

OK folks, if you don’t do any computer programming, then don’t bother reading the rest of this post…you have been warned. :)

I’ve been working on a program in preparation for an upcomming programming contest I’ll be participating in. In so doing, I’ve been learning a little more about C, as up until now, I’ve been using either C++ or Java (with a little PHP to top it off). I haven’t been completely clueless about C, since if you don’t know at least a little C, you won’t be that good at C++. So, for the past day or so, I’ve been translating a program from C++ to C. This program accepts any number of INTs on stdin, and prints out the prime factors of that int. It seems to work fine in C++, however, I wanted to see if there would be any performance advantage to doing it in C. So, I have it completely translated, and it even compiles…the problem is, however, that it will not link after compilation. I get the following message from ld:

/tmp/ccepGEcX.o: In function `main':
test.c:(.text+0x46): undefined reference to `sqrt'
collect2: ld returned 1 exit status

I even tried to do the following simple test program to make sure it wasn’t something else in my program that was messing up:

#include "stdio.h"
#include "math.h"

int main () {
double test = 5;
double test2 = sqrt(test);
printf("%f", test2);
return 0;
}

By the way, those include lines are using brackets, not quotes, when I try to compile it: stupid HTML. So, my question, to all those C experts, is, WHAT AM I DOING WRONG?!?!

October 8, 2005

Same Card…Better Price

Filed under: Computers — Jared Sutton @ 2:04 pm

Well, my Dad asked me to get him a wireless network card so that he could check his email while he was away on trips. So, I started looking around, and realized that most of the cards out there stick out an inch or more from your computer. Why someone had the bright idea to do that, I’m not sure, but I did know of a card that didn’t: the Netgear MA521. I have a card just like this, and I use it with my older IBM Thinkpad T20 (which is running Ubuntu Linux right now). It works wonderfully, however when I went to Froogle to see what my price options were, I was suprised to find that all the trustworthy internet retailers had it for $30 or more. Now, if this had been an 802.11g card, I would understand, but this card is only an 802.11b card that is more than 2 years old!

So, I was about to give up on that card, when I remembered that a co-worker of mine had a wireless card that looked almost identical to the MA521, but it was made by a company called TRENDnet. So, I went hunting around to see if I could find this card. To my suprise, I found it on newegg.com, my favorite online retailer. :) It’s the TRENDnet TEW-226PC, and as you can see, it is virtually identical to the Netgear MA521 (save the Netgear logo). I did a little investigating, just to make sure that it used the same chipset, and a quick look in the comments section on Newegg showed that it used the Realtek 8180L chipset, the same as the MA521. So, I ordered it, and saved over $10, just because it is a less-well-known brand.

And, who knows, maybe Netgear just contracted TRENDnet to build the card, and slap their logo on it. ;)

October 7, 2005

Free ISO Burner

Filed under: Computers — Jared Sutton @ 4:25 pm

This little gem made my day (several days ago). It’s an application called ImgBurn (from the author of the now defunct DVD Decrypter) that burns CD/DVD ISO images. You can find it here. It’s not Open Source, however it is free as in Pepsi (if you don’t know what I’m referring to, don’t worry; I just meant that it is a free program). I mean, just last week, I needed to burn an ISO image on a computer at work, and it had just been re-imaged, but no CD burning software installed. So, I was forced to find a laptop in the back room that happened to have a CD-RW drive, and the necissary software installed. Definitely more trouble than it was worth, but I finally got what I needed. I I had known about this little app, I could have saved myself a lot of work. Lesson learned.

Powered by WordPress