Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodeBlocks undefined reference to WinMain@16

Tags:

c++

codeblocks

I just started studying C++ using CodeBlocks.

When I started to learn how to make class on .h file, first it always return that I'm missing the .h files, I have linked it on Search Directories.

Then when I compile again, the error change into "undefined reference to WinMain@16". I have already added -lmingw32 to linker option, but still return same error.

So I hope anybody would like to tell me how I can fix the problem. Thank you :)

like image 727
n0talentGEEK Avatar asked Apr 01 '26 12:04

n0talentGEEK


1 Answers

try adding library

libcomdlg32.a

project > build options > linker settings

along with

gdi32 ,user32 ,kernel32 , comctl32

like image 162
user1232296 Avatar answered Apr 03 '26 01:04

user1232296



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!