News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

undefined reference to `WinMain@16'

Started by wever, August 30, 2014, 11:49:26 PM

Previous topic - Next topic

wever

I got this error:

mingw32-g++.exe -LC:\PROGRA~1\AMDAPP~1\lib\x86\ -o bin\Debug\Gaussian_with_OpenCL.exe obj\Debug\args.o obj\Debug\bitmap.o obj\Debug\gaussian.o   C:\PROGRA~1\AMDAPP~1\lib\x86\OpenCL.lib W:\___NEW~1\GAUSSI~1\GAUSSI~2\refu.dll C:\PROGRA~1\AMDAPP~1\lib\x86\OpenCL.lib W:\___NEW~1\GAUSSI~1\GAUSSI~2\refu.dll
p:/programy/programování/codeblocks_32bit/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../libmingw32.a(main.o):main.c:(.text.startup+0xa7): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status



I am using gcc and main function. On stackoverflow somebody suggested to use -mwindows option but 1) I did not find what does this do 2) I cannot find out where should I place this option or how you configure the options for compiler in code blocks. Help pls

oBFusCATed

Project -> properties -> build targets -> Type set it to native or gui...
If it doesn't work (I'm not a windows user anymore) search the forum for sollutions...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

wever

I made it working. It was because there was not created main script, so the main function was missing.