kumoshk
September 6th, 2009, 06:39 AM
I've noticed many issues with linking in Ubuntu, and one important one with including.
I've figured out how to work around the include problem, which is this:
I have to reference the full path to the header files. For instance, instead of typing
#include "lua.h"
I have to type
#include "/usr/include/lua5.1/lua.h"
How do I fix this? It's kind of annoying when I have to do this and it seems everyone else and their dog thinks it's second nature to do it the other way. I have two completely different installations of Ubuntu (both Jaunty, one 32 bit on my desktop and the other 64 bit on my laptop), and they both behave the same way. Plus, I'm curious why doesn't it seem like this issue is ever addressed if Ubuntu ships like this out of the box: do you all know something I don't? I guess so.
With linking, however, it seems that no matter what example program I'm trying to compile, some library or other will not link, regardless of whether I have it installed. Unfortunately, I don't even know a workaround for that, but I'm guessing it's a similar problem. I'm not very familiar at all with linking—so if you could tell me something useful, feel free. The error message is gives just tells that it can't find the library or some such (I'm not in a position to find the exact message at the moment, but perhaps later).
Any ideas?
I've figured out how to work around the include problem, which is this:
I have to reference the full path to the header files. For instance, instead of typing
#include "lua.h"
I have to type
#include "/usr/include/lua5.1/lua.h"
How do I fix this? It's kind of annoying when I have to do this and it seems everyone else and their dog thinks it's second nature to do it the other way. I have two completely different installations of Ubuntu (both Jaunty, one 32 bit on my desktop and the other 64 bit on my laptop), and they both behave the same way. Plus, I'm curious why doesn't it seem like this issue is ever addressed if Ubuntu ships like this out of the box: do you all know something I don't? I guess so.
With linking, however, it seems that no matter what example program I'm trying to compile, some library or other will not link, regardless of whether I have it installed. Unfortunately, I don't even know a workaround for that, but I'm guessing it's a similar problem. I'm not very familiar at all with linking—so if you could tell me something useful, feel free. The error message is gives just tells that it can't find the library or some such (I'm not in a position to find the exact message at the moment, but perhaps later).
Any ideas?