1

i have a user-defined c++ library, let's call it library. it has several header files in its folder which i have dropped into the mingw include directory (mingw\include). i have also the achirved liblibrary.a file dropped into the mingw lib directory (mingw\lib).

and in a main.cpp file, i have included one of the header files following the rules e.g like when you include the openGL header files; this is what we do

#include <GL/glut.h>

and so my include looks like this

#include <library/header.h>
int main (){
   /*
    ** blah blah
    */

}

and in compiling,

g++ -c main.cpp 

the compiler complains that it can't find the library/header.h file, what could i be doing wrong?

so that i don't get to link it..

g++ -llibrary main.o -o main
Obby
  • 1,353
  • 2
  • 13
  • 20

1 Answers1

0

You could try this

g++ main.cpp -llibrary -o main

ref

Community
  • 1
  • 1
Zombo
  • 1
  • 62
  • 391
  • 407