# Error: file not found with \<angled\> include; use "quotes" instead

**URL:** <https://forums.swift.org/t/error-file-not-found-with-angled-include-use-quotes-instead/69310>\
**Category:** Using Swift\
**Tags:** packagemanager, module, clang\
**Created:** [January 7, 2024, 3:02am UTC](https://forums.swift.org/t/error-file-not-found-with-angled-include-use-quotes-instead/69310 "2024-01-07T03:02:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixfxu](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@felixfxu](https://forums.swift.org/u/felixfxu)\
**Post date:** [January 7, 2024, 3:02am UTC](https://forums.swift.org/t/error-file-not-found-with-angled-include-use-quotes-instead/69310/1 "2024-01-07T03:02:01Z")

</div>

Hi,

I'm using swift 5.9.1 on Windows and trying with swift package manger to create a clang module, but I'm having a strange error:

```
error file not found with <angled> include; use "quotes" instead

```

I uploaed my project at [GitHub - felixf4xu/swiftclangmodule: demo project of swift clangmodule include issue](https://github.com/felixf4xu/swiftclangmodule.git)

 ![image](https://global.discourse-cdn.com/swift/original/3X/3/9/39426de83f8ca79c3f9ed590f8bcea9bc78ad9d6.png)

Basicly the package has 2 target, one is exe in swift, the other one is a c++ library project as clang module.

the clang module is named Cxxlib, it has an umbrella header file at: `Cxxlib/include/Cxxlib.h`

The c++ project of the library is in folder `cxxsource`, which is a standard (hopefully) cmake project. It has public headers in `cxxsource/include` folder, and other source (.cpp) and private header file in `cxxsource/sublib1` and `cxxsource/sublib2` folders. Under `cxxsource`, there is a `CMakeLists.txt` file and it can be built with cmake sucessfully.

> cxxsource  
> --include (cxxsource's public header folder)  
> --sublib1  
> --sublib2

In cmake, to use the public include folder, `target_include_directories` is used as:

```cmake
target_include_directories(${PROJECT_NAME} PUBLIC     
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
    $<INSTALL_INTERFACE:include/${PROJECT_NAME}>)

```

I put all the cxxsource project source (public header and source files) in the `Cxxlib` module, so it's not needed to install the cxxsource to system folders. (it can be changed if it's not the way to use a clang module -- I'm new to swift)

The current github commit can be compile by `swift build` and then `swift run`, but here is the issue:

in `cxxsource\include\public.h`, my cxxsource project's publich header file:

```cpp
// error: 'sublib2/public2.h' file not found with <angled> include; use "quotes" instead
// #include <sublib1/public1.h>
// #include <sublib2/public2.h>

#include "sublib1/public1.h"
#include "sublib2/public2.h"

```

 ![image](https://global.discourse-cdn.com/swift/original/3X/7/f/7feeb355db3639d1b0fb52b24b2f17255f14e290.png)

I originally wanted to use include, like:

```cpp
#include <sublib1/public1.h>
#include <sublib2/public2.h>

```

I would have a compiler error:

```sh
error: emit-module command failed with exit code 1 (use -v to see invocation)
<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "D:\testcode\swiftclangmodule\Sources\Cxxlib\include\Cxxlib.h"
         ^
D:\testcode\swiftclangmodule\Sources\Cxxlib\include\Cxxlib.h:1:10: note: in file included from D:\testcode\swiftclangmodule\Sources\Cxxlib\include\Cxxlib.h:1:
#include "../cxxsource/include/public.h"
         ^
D:\testcode\swiftclangmodule\Sources\Cxxlib\include/../cxxsource/include/public.h:4:10: error: 'sublib1/public1.h' file not found with <angled> include; use "quotes" instead      
#include <sublib1/public1.h>
         ^

```

that's from my previous cmake experience, if I have set the public `cxxsource/include` header dir by `target_include_directories`, I can (or should) use `<>` for header file. `cxxsource` is a big c++ project, I use `<>` almost in all places that I need to use header files in the `cxxsource/include` folder.

Now it seems that if I put the `cxxsource/include` in the clang module and the umbrelle header file (`Cxxlib/incude/Cxxlib.h` incudes `cxxsource/include`, I need to use "quotes" include.

Anything wrong here? swift package manager? clang module? my understanding of "quotes" and `<angled>` ?

Thanks.
