statusquo
October 6th, 2007, 10:07 AM
Hi,
I'm trying to compile a program that uses a utility called wordnet. I need to use its header file, which is located at /usr/local/WordNet-3.0/include/wn.h
My code is in a file called main.cpp looks like this:
#include <iostream>
#include "wn.h"
int main() {
// yadyada
}
And I'm trying to compile with:
g++ -l/usr/local/WordNet-3.0/include/ -o main main.cpp
Yet for some reason it gives:
main.cpp:3:24: error: wn.h: No such file or directory
If I add #include "/usr/local/WordNet-3.0/include/wn.h" then it works perfectly, but I don't want to do this because then I won't be able to use my code on any other computers.
I'm using:
g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Does anyone have any idea why this might be happening?
Thanks
I'm trying to compile a program that uses a utility called wordnet. I need to use its header file, which is located at /usr/local/WordNet-3.0/include/wn.h
My code is in a file called main.cpp looks like this:
#include <iostream>
#include "wn.h"
int main() {
// yadyada
}
And I'm trying to compile with:
g++ -l/usr/local/WordNet-3.0/include/ -o main main.cpp
Yet for some reason it gives:
main.cpp:3:24: error: wn.h: No such file or directory
If I add #include "/usr/local/WordNet-3.0/include/wn.h" then it works perfectly, but I don't want to do this because then I won't be able to use my code on any other computers.
I'm using:
g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Does anyone have any idea why this might be happening?
Thanks