I’ve been stuck on stage Gzip Compression #CR8 for a while now and even checked other people’s code examples to see they seem to be using the same gzip functions as me.
Some notes about my environment and code
- i’m coding on ubuntu and i installed the cmake snap after seeing that might be an issue
- i’m using the codecrafters cli to submit my code for tests
- i just learned about the codecrafters github app so i could have my code checked for assistance with this issue, here’s the code in the repo brycegallo-codecrafters-http-server-c/src/main.c at 86e5241fe7ba3fa21183da387848867cf92f54ee · brycegallo/brycegallo-codecrafters-http-server-c · GitHub i apologize in advance for the state of my code, i’m still very new to C
and here’s the output i’m currently seeing
[compile] -- Build files have been written to: /app/build
[compile] [ 50%] Building C object CMakeFiles/http-server.dir/src/main.c.o
[compile] [100%] Linking C executable http-server
[compile] /usr/bin/ld: CMakeFiles/http-server.dir/src/main.c.o: in function `gzip_deflate':
[compile] main.c:(.text+0x8d): undefined reference to `deflateInit2_'
[compile] /usr/bin/ld: main.c:(.text+0xa7): undefined reference to `deflateBound'
[compile] /usr/bin/ld: main.c:(.text+0x105): undefined reference to `deflate'
[compile] /usr/bin/ld: main.c:(.text+0x11f): undefined reference to `deflateEnd'
[compile] collect2: error: ld returned 1 exit status
[compile] gmake[2]: *** [CMakeFiles/http-server.dir/build.make:97: http-server] Error 1
[compile] gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/http-server.dir/all] Error 2
[compile] gmake: *** [Makefile:91: all] Error 2
[compile] Looks like your code failed to compile.
[compile] If you think this is a CodeCrafters error, please let us know at hello@codecrafters.io.