User forums > Using Code::Blocks

Win: IsUserAnAdmin() and CheckTokenMembership(..)

<< < (2/2)

Jenna:

--- Quote from: jmb on January 20, 2015, 04:28:38 pm ---ok, so I was totally wrong about my expectations about the forum. My first Idea was, as I mentioned above, that this forum will
discuss all topics around the usage of that IDE. I thought, this includes how to set up compilers and linkers, too.

During my investigations I found things like : "in this and that IDE it is handled so and so. I dont know, how it works in codeblocks.."

My next step was then to search for an codeblocks-forum *shrugs*

--- End quote ---

If you know what to set, but don't know where to do it in Code::Blocks it's a valid question here.
But if you only know what it should do, but don't know how to do it with the compiler you use, the question is not valid.

The compiler shipped with C::B is shipped for convenience, but we can not give any support for it, sorry.
Code::Blocks supports lots of compilers and it's absolutely impossible to give support for all of them.

Jenna:
And what's more, it's clearly stated in the forum rules.
When registering here you accepted to follow these rules.
And a link to the rules is placed above the "Post"-button as reminder for the users.

MortenMacFly:
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.

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. :-)

jmb:

--- Quote from: MortenMacFly on January 20, 2015, 07:58:21 pm ---
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. :-)

--- End quote ---

Thank you, for making this clear ;-)  Makes sense. I really thought, its an codeblock-problem.


--- Quote ---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.

--- End quote ---


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)) ===|


Navigation

[0] Message Index

[*] Previous page

Go to full version