Now, you can see from this build log that you not arrive to the linking stage. You are still at compiling and try to fix linking problems...
This forum is not the right place for this kind of questions (from the type of: "help get compiler error blabla, what should i do?" This forum is for questions like "Help, i get compiler error blabla and i know this is because i am missing the compiler flag xa. Where do i put this flag?" ) and by this violating the forum rules and probably will get locked. But anyway:
E:\WorkSpace\Code\TaskScheduler\main.cpp:9:0: warning: ignoring #pragma comment [-Wunknown-pragmas]
#pragma comment(lib, "taskschd.lib")
gcc does not understand the "#pragma comment" and so you should remove all of them. But you should add all this ".lib" entries to
Project->Build options->Select the project name on the left->Linker settings->Additional libraries
E:\WorkSpace\Code\TaskScheduler\main.cpp:47:5: error: 'ITaskService' was not declared in this scope
ITaskService *pService = NULL;
Ok, lets google this "'ITaskService' was not declared in this scope"...
according
https://msdn.microsoft.com/en-us/library/windows/desktop/aa381832(v=vs.85).aspx this class is declared in taskschd.h . You included this header file but the compiler still can not find this class. I opened the file and searched for this class an can not find it. This sounds like tdm mingw what is shipped with codeblocks does not support this interface. A quick search showed that mingw64 has this interface. So you will need this compiler...
How to set up mingw64 in codeblocks?
I am not on a windows machine so i can not help you here, but generally it should be like this:
1) Install mingw64
2) in codeblocks Settings->Compiler->global compiler settings->Selected compiler->GNU GCC -> copy
3) For the new name enter "mingw64 gcc" -> ok
4)Toolchain executables->Compilers' installation directory -> point to the "bin" directory from the mingw64 installation->Try "auto detect"
5)If it fails you have to put the names of the corresponding executables at the bottom in the "Program Files"
6) Ok
7) Open your project->Project->Build options->On the left select your project name->From the drop down menu on the right top-> Select "mingw64 gcc" -> Ok
Build -> Clean
9) Build -> Run
if you have problems after installing mingw64 and setting it up in codeblocks make a new thread (This is the kind of questions this forum is for)
If you have problems after the installation of mingw64 and compiling your project ask again here...
This are all assumption. I can not test them because i do not use windows at the moment and i can not test this....