I'm sorry if this has been asked before. In day 01 and 02 of Week 1, Casey fixes undefined symbols compiling problems by adding these (user32.lib, gdi32.lib) to the build.bat file. How do you fix this in cmake?
I'm not sure what you mean by "absolute path" for user32.lib. You wrote relative path. And it's been a while since I used cygwin, but as far as I remember it uses .a or .dll.a suffix for import libraries. No .lib - that is MSVC specific suffix. Although import libraries are the same for binutils and MSVC linker.
Btw I strongly recommend to get rid of cygwin, and instead use msys2 which provides native mingw port for gcc compiler.
Yeah, choose mingw over cygwin. Cygwin produces binaries that depend on cygwin runtime (which provides POSIX compatibility). With mingw you'll get native binaries that depend only on system dll files. Unless you are creating/using some software that depend on open-source libraries that doesn't compile under mingw, there is absolutely no reason to use cygwin.