How i can include static library NTL in new project?

137 Views Asked by At

When I build my program, I have next error:

Error C1083
Cannot open include file: 'ZZ.h': No such file or directory NTL C:\Progs\NTL\src.cpp

My code:

#include <ZZ.h>
     
int main(){
    ZZ a, b, c;
    return 0;
}
  1. Download library ntl 11.5.1 for Windows from https://libntl.org/download.html
  2. Build static library
    1. File \ New \ Project Existing Code...
    2. Next
    3. Project file location: C:\2\WinNTL-11_5_1\src
    4. Preject name: ntl
    5. Next
    6. Project type: Static library (LIB) project
    7. Finish
    8. Project \ Properties \ VC++ Directories \ Include Directories \ Edit: C:\2\WinNTL-11_5_1\include
    9. Build \ Rebuild Solution
  3. Copy static library _NTL.lib in my project NTL
  4. In NTL project:
    1. Project \ Properties \ VC++ Directories \ Library Directories -> ./NTL
    2. Project \ Properties \ Linker \ Input \ Additional Dependencies -> _NTL.lib
1

There are 1 best solutions below

1
Silvio Mayolo On

All of the NTL header files are in a directory called NTL. You need to reflect this in your #include directive.

#include <NTL/ZZ.h>