# Interfacing C/zig with translate-c: can I filter out builtin functions from translate-c output?

**URL:** <https://ziggit.dev/t/interfacing-c-zig-with-translate-c-can-i-filter-out-builtin-functions-from-translate-c-output/566>\
**Category:** Help\
**Created:** [March 23, 2023, 3:43pm UTC](https://ziggit.dev/t/interfacing-c-zig-with-translate-c-can-i-filter-out-builtin-functions-from-translate-c-output/566 "2023-03-23T15:43:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![nurpax](https://ziggit.dev/user_avatar/ziggit.dev/nurpax/32/1217_2.png) [@nurpax](https://ziggit.dev/u/nurpax)\
**Post date:** [March 24, 2023, 9:19am UTC](https://ziggit.dev/t/interfacing-c-zig-with-translate-c-can-i-filter-out-builtin-functions-from-translate-c-output/566/3 "2023-03-24T09:19:13Z")

</div>

Below is the error that I get. FWIW, using `#include <header>` is not ideal, it should be `#include "header"` but seems to be not what Zig’s doing.

But I was able to fix it too. In my case, I have split my project into “utils” (lib) package and “main” (exe). I had added the include path for “utils” with `lib.addIncludePath("src/gfxutil/")`. With just this, building `main` exe fails as below. But if I also add `exe.addIncludePath("src/gfxutil/")` to the exe build options, it works. This is a little surprising, I would’ve expected it to be enough to specify the include path only for the library I’m building and that’d be enough. It’s probably not working as intended…?

```zig
src\gfxutil\joystick.zig:3:12: error: C import failed
const c2 = @cImport({
           ^ ~~~~~~~
referenced by:
    initJoystick: src\gfxutil\joystick.zig:9:5
    init: src\main.zig:267:21
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

<snip>\67da55fd196b7c4b10285f836db20262\cimport.h:1:10: error: 'joystick.h' file not found
#include <joystick.h>
         ^

```

---

_[View the full topic](https://ziggit.dev/t/interfacing-c-zig-with-translate-c-can-i-filter-out-builtin-functions-from-translate-c-output/566)._
