From: Oscar F. <of...@wa...> - 2002-02-09 08:19:50
|
"Devin Carless" <dcc...@ya...> writes: > Hello all, > > Of recent, as a way of doing something useful with my time, I've begun to > teach myself C++. (Those of you wincing already need read no further.) > The only book available is eight years out of date and has no index to speak > of. Be careful with what you use to learn. There are very bad C++ books out there that can harm you for a long time. You can take a look to the ACCU book reviews to know some qualified opinion about your book: http://www.accu.org/bookreviews/public/index.htm There is a decent book published in electronic format: http://www.mindview.net/Books Look for "Thinking in C++". [snip] > I have the feeling they're symptoms of a deeper problem, one > that I'm at a loss to diagnose or fix. You could try to make a small code snippet that should compile and that shows your problem, post here and expect than somebody explains why it doesn't work. [snip] > A virtual deconstructor caused an undefined reference error.. until > the declaration was moved from the bottom of the public: section of the > class to third, right after the constructors. What's more, this fix got rid > of another undefined reference error in the same class. I've also had > similar problems with the inline statement and a typedef. You are facing the typical problems every newbie has. > As you can see, I've managed to get rid of these annoying errors, at the > cost of making my code less readable. Well, it would be better if you undestand why this changes are necessary, don't you think? You have a lot of ngs and mailing lists where you can ask. [snip] > (Anything inside the linker > may as well be voodoo to me: 'tlink -o > -v blackcockerel.o'.) tlink? Hmmmm... shouldn't it be 'ld' or 'gcc'? > I've trawled the Net back and forth looking for any sort of explanation. > It's probably not the compiler; the errors persist when I compile as Cygwin > (an option Dev-C++ gives you.) All the problems other people seem to be > having are with linking to libraries. My problem is linking to functions > the compiler recognizes and has passed on as valid to the linker. Well, without seeing a _complete_ and _minimal_ example (less than 50 lines, please) one can't help much. [snip] -- Oscar |