# Undefined Reference to deflateInit2\_, deflate, deflateEnd c++ #CR8: Gzip

**URL:** <https://forum.codecrafters.io/t/undefined-reference-to-deflateinit2-deflate-deflateend-c-cr8-gzip/643>\
**Category:** Challenges\
**Tags:** challenge:http-server\
**Created:** [June 6, 2024, 8:20pm UTC](https://forum.codecrafters.io/t/undefined-reference-to-deflateinit2-deflate-deflateend-c-cr8-gzip/643 "2024-06-06T20:20:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JusDooEt](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/jusdooet/32/583_2.png) [@JusDooEt](https://forum.codecrafters.io/u/JusDooEt)\
**Post date:** [June 6, 2024, 8:20pm UTC](https://forum.codecrafters.io/t/undefined-reference-to-deflateinit2-deflate-deflateend-c-cr8-gzip/643/1 "2024-06-06T20:20:44Z")

</div>

![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/1X/2ff0671d2f23592aa96188e7c824fb7279ec18b0.png)

I do not understand how to solve this issue. I have tried installing gzip locally and messing with cmake files but im not sure what the problem is. Currently using Git Bash

---

<div class="post-metadata">

**Author:** ![rohitpaulk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rohitpaulk/32/6_2.png) [@rohitpaulk](https://forum.codecrafters.io/u/rohitpaulk)\
**Post date:** [June 18, 2024, 1:34pm UTC](https://forum.codecrafters.io/t/undefined-reference-to-deflateinit2-deflate-deflateend-c-cr8-gzip/643/2 "2024-06-18T13:34:03Z")

</div>

Hey @JusDooEt! You should be able to add zlib using the instructions here: [C++ - CodeCrafters](https://docs.codecrafters.io/challenges/language-support/cpp#adding-dependencies).

We’ll add this to the starter code too, will keep this open until that’s done!

---

<div class="post-metadata">

**Author:** ![rohitpaulk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rohitpaulk/32/6_2.png) [@rohitpaulk](https://forum.codecrafters.io/u/rohitpaulk)\
**Post date:** [June 19, 2024, 4:55pm UTC](https://forum.codecrafters.io/t/undefined-reference-to-deflateinit2-deflate-deflateend-c-cr8-gzip/643/4 "2024-06-19T16:55:02Z")

</div>

For reference, here’s the PR that adds this to the starter code:

> <https://github.com/codecrafters-io/build-your-own-http-server/pull/80>

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [June 24, 2024, 4:55pm UTC](https://forum.codecrafters.io/t/undefined-reference-to-deflateinit2-deflate-deflateend-c-cr8-gzip/643/5 "2024-06-24T16:55:09Z")

</div>

Closed on June 24, 2024, 4:55pm UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
