And bare in mind that although this sounds harsh we have to be strict when it comes to compiler errors. This is an error coming from the compiler just being reported by the IDE therefore it would really not belong here for the reasons Jens stated. C::B supports way to many compilers and if you additionally take their versions into account, probably nobody can provide meaningful answers. :-)
Thank you, for making this clear ;-) Makes sense. I really thought, its an codeblock-problem.
Any way... I doubt that the compiler that ships with C::B does not support that. Please post the full build log... Just to be sure.
It seems, there are some people, who have exactly the same problem. And I didn't found a good solution.
Nevertheless, here are the logs: (Source of affected function is in my first posting here)
------------------------------------- cut ----------------------------------
Build-Log:
------------
-------------- Clean: Release in DNS_Umschalter (compiler: GNU GCC Compiler)---------------
Cleaned "DNS_Umschalter - Release"
-------------- Build: Release in DNS_Umschalter (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -ansi -O2 -ansi -c M:\!CodeBlocks_Tests\DNS_Umschalter\DNS_Umschalter\DNS_Umschalter.cpp -o obj\Release\DNS_Umschalter.o
M:\!CodeBlocks_Tests\DNS_Umschalter\DNS_Umschalter\DNS_Umschalter.cpp: In function 'BOOL IsUserAdmin()':
M:\!CodeBlocks_Tests\DNS_Umschalter\DNS_Umschalter\DNS_Umschalter.cpp:591:42: warning: missing braces around initializer for 'BYTE [6] {aka unsigned char [6]}' [-Wmissing-braces]
windres.exe -J rc -O coff -i M:\!CODEB~1\DNS_UM~1\DNS_UM~1\HAUPTD~1.RC -o obj\Release\hauptdialog.res
mingw32-g++.exe -o bin\Release\DNS_Umschalter.exe obj\Release\DNS_Umschalter.o obj\Release\hauptdialog.res -s -lgdi32 -luser32 -lkernel32 -lcomctl32 -ladvapi32 -mwindows
obj\Release\DNS_Umschalter.o:DNS_Umschalter.cpp:(.text+0x1128): undefined reference to `CheckTokenMembership(void*, void*, int*)@12'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 1 warning(s) (0 minute(s), 0 second(s))
Build-Messages:
-------------------
||=== Build: Release in DNS_Umschalter (compiler: GNU GCC Compiler) ===|
CodeBlocks_Tests\DNS_Umschalter\DNS_Umschalter\DNS_Umschalter.cpp||In function 'BOOL IsUserAdmin()':|
CodeBlocks_Tests\DNS_Umschalter\DNS_Umschalter\DNS_Umschalter.cpp|591|warning: missing braces around initializer for 'BYTE [6] {aka unsigned char [6]}' [-Wmissing-braces]|
obj\Release\DNS_Umschalter.o:DNS_Umschalter.cpp|| undefined reference to `CheckTokenMembership(void*, void*, int*)@12'|
||=== Build failed: 1 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|