In the "additional paths", make sure you put "/binnt"
Then open Code::Blocks and open "settings"->"compiler" select the "Open Watcom (W32) Compiler", go to "toolchain executables" and direct it to the correct executables and directories of Open Watcom.
Basically, install Open Watcom following the installation instructions on it's site.
Open Watcom is the easiest to setup with Code::Blocks. Code::Blocks has support for these compilers built into it, but the settings will need a bit of tweaking to get it to build correctly for DOS.
CD-ROM Drivers Collection of URL Links to DOS drivers for various CD-ROM drives.archived site about USB support for DOS.Computing.Net DOS forum Post and answer questions about DOS.DOS TCP/IP networking with Packet Drivers.Bright Electronics - MS-DOS Networking howto guide on peer to peer networking with DOS.Wordstar Resource Site a help site for WordStar for DOS users, has several freeware DOS Wordstar utilites.WordPerfect for DOS Updated Great site for drivers, info and other resources for WordPerfect 5.x/6.x for DOS and for running WPDOS in Windows 7/8/10.Internet Archive's Software Library: MS-DOS Games Play DOS games in your (modern) browser.GOG.com buy and download many DOS games.
FreeDOS website has a news section about DOS which is regularly updated.