Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I made a library in Linux with a .h file test.h. So I have libtest.a which has a test.h file in it. I made a new makefile for a ...
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    1

    makefile help needed

    Hello,

    I made a library in Linux with a .h file test.h. So I have libtest.a which has a test.h file in it.

    I made a new makefile for a program I have:

    stupidprogram: $(OBJECTS)
    g++ -dy -o -L. -ltest stupidprogram $(OBJECTS) $(LDLIBS)

    but when I try to make, I get an error indicating the .h file is missing?? ANy idea why it cant see it???

    I also tried just command line compilation:
    and same error:

    $ gcc -L. -ltest stupidprogram.cpp -o main
    stupidprogram.cpp:1:18: error: test.h: No such file or directory


    Thanks!

  2. #2
    Just Joined!
    Join Date
    Mar 2007
    Posts
    3

    Cool Include Header Path

    I think you need to add the following to your compilation line:

    -I<path-to-folder-where-header-file-is>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...