Question
In lecture 151, in codegen.c line 857, you use off_t. It doesn't raise an error in your Visual Studio. In mine it does, but the code does compile fine with gcc. If I include it is resolved, but you do not include this in your source. Any suggestions?
Thanks
Answered by Daniel McCarthy
Instructor
On GCC (Linux or POSIX systems), off_t is part of the standard headers. It works because the compiler environment provides POSIX-compliant libraries. Visual Studio (on Windows) does not natively include or define off_t, as it is a POSIX-specific type. This is why you encounter an error when compiling with Visual Studio.
I recommend following on Linux
Thanks and have a good new year, feel free to reach out with any further questions. For quicker responses you can email me direct: daniel@dragonzap.com