User forums > Help

undefined reference to `GetStockObject@4'|

(1/5) > >>

Дмитро:
Hello Hello everyone! My codeblocks gave the error. undefined reference to `GetStockObject@4'| What is it? How to solve it, what to do to fix it? :'(


--- Code: (mysql) ---wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
--- End code ---

Miguel Gimenez:
You must link with Gdi32.lib (or libGdi32.a if using MinGW).

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Дмитро:
Yes, I find in myself really. D:\CodeBlocks\MinGW\lib\libgdi32.a

Дмитро:
I am running Code::Blocks version 17ю12 on windows
(version 7). The compiler I use is MinGW
version 5.1.0.

Дмитро:
What settings kodeblocksiv should be performed to correctly find libgdi32.a? How is it before, for years, I have not met the problem of finding ordinary libraries?

Navigation

[0] Message Index

[#] Next page

Go to full version