Did you try "Clean and Build" or just "Build"?
Hmmmm; Creating the example Alert Notification Profile Example Project for the CYBLE-222014-01 and changing it to the CY8C4248LQI-BL583 using right-click on the project file and selecting "device selector" works fine for me.
Are you including #include <project.h> in your file(s)?
Since I constructed my code from source code that Cypress provided (e.g, Central and Peripheral, UART-to-BLE, Peripheral and Broadcasting,etc.), I assume they provided all the necessary references to have the project compile correctly. As I said, it did before I changed the device reference. What changed? The errors appear to reference code Cypress provided, not code which I added.
I am seeing cytypes.h (under cy_boot folder) clearly in the project that is not compiling correctly. Line 466 and on give the definitions to types that are declared elsewhere in the project. Yet it is not being seeing. Why? Nor is CYBLE_API_RESULT_T also referenced in the same file.
The file that is erroring out is BLE_StackGatt.h. At the top of this provided file are no include files. I assume Psoc creator has a method for these files to find references without them being specifically stated within the file themselves. Somehow it is able to reference the project.h file which is part of the project structure.
The unknown types generally means that you forgot to include declarations for how the types are declared/handled by the compiler.
Thus, you need to #include the files to contain the declarations for those types.
Hmmm, yeah; The auto-generated files are pretty much "leave alone" for me. So, if those are the ones causing the issue, perhaps deleting and regenerating the auto-generated files will fix the issue?
Also, there were some complaints surrounding the PSoC Creator version 4.0 to 4.1 update, so potentially this might be related.
Please check that whether you have project.h referenced in your global.h file.