Dev C++ Undefined Reference To Winmain 16

by

But in the end my compiler comes with a lot of errors, all of them is:
[Linker error] undefined reference to `Something'
basically any command in the source code (Any SDL commands that is).
I have read in other threads, that it's because i have forgotten to include the library, but i think i have.
I'm using the dev-c++ compiler.
I went into the: Tools fan, and then chose: compiler options.
Then i chose Directories.
After that i went to the: 'Directories' fan.
In here, there are three deifferend things i can include:
Binaries, Libraries, C includes and C++ includes.
I didn't include anything in binaries, since i couldn't find any SDL binaries.
I included the directory called: 'Lib', as the SDL library.
I included the directory called: 'Include' as both the C includes and the C++ includes, since i didn't know which of them it was supposed to be included as.
SDL, needs to be installed, and as so, it get's a stand alone directory, in C:/Program files/SDL (Or whereever you choose to locate it), the directorires i refer to, that i included, are all directories located in that directory.
So it seems, to me, like i included about everything, that's supposed to be included.
It should be said that i'm learning C++. so i'm a n00b at this. I'm new to both the langauge and the compiler, though i have programmed in another langauge, for pretty some while.
But since i'm new, i would ask you to now assume that i can anything, cause i realy can't. So please help me, step by step, i haven't even made the source code. It's from my stipendium.
O, and please tell me why i have to do what i have to do. I don't just wanna know how to fix it, i also wanna know why i'm fixing it the way i am, since i'm learning the langauge, i would also like to learn from this mistake ^^
i would also like to know how to correct the error, from the title. ([Linker error] undefined reference to `WinMain@16') i have came to the understanding, that, that specific error has another way to be corrected, than the rest.

  1. Undefined Reference To Winmain 16 Mingw
  • 5 Contributors
  • forum 10 Replies
  • 614 Views
  • 2 Years Discussion Span
  • commentLatest Postby SgtMeLatest Post
  • C; ข้อความแสดงข้อผิดพลาดใน codeblocks: การอ้างอิงที่ไม่ได้กำหนดเป็น 'WinMain @ 16' 2020-04-17 c gcc codeblocks winmain.
  • Linker error undefined reference to `WinMain@16' You've created a project that's being built as a Win32 application. Those guys use WinMain instead of main as the entry point.

Jan Mura napsal(a): function. There is no main neither WinMain. I don't use windows.h, Win components or anything like that. If there is no main or WinMain you can only compile it (Ctrl+F9) but not run. The WinMain function that is missing from your code is the 'main' function that is expected from a GUI Win32 application. If you select 'console' application, it should be looking for the 'main' function, which I presume you have defined in your 'main.c' file. C Undefined Reference To Function Gender roles for a jungle treehouse culture Box around continued fraction Specific word to describe someone who is so good that isn't even considered in say a classification Publishing a mathematical Is it possible to keep publishing under my professional (maiden) name, different from my married legal name? Jul 29, 2015.EDIT. oops, I accudently posted this in the wrong forum. Does anyone know how to remove or move this post to 'help general forum'? Thanks I did everything right.

Dev C++ Undefined Reference To Winmain 16

Narue5,707

>[Linker error] undefined reference to `WinMain@16'
You've created a project that's being built as a Win32 application. Those guys use WinMain instead of main as the entry point. If you want a regular C++ program, you have to choose the correct project type (which would be a console project of some sort) or build it yourself manually from the command line.

cs2370week8cs2370week8AssigncardDeck.o'
c:/program files/codeblocks/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
Process terminated with status 1 (0 minutes, 7 seconds)
1 errors, 0 warnings (0 minutes, 7 seconds)

Windows 10 iso. Mar 23, 2019  How to download the Windows 10 ISO file. Navigate to the Microsoft Windows 10 ISO download page. Click the dropdown menu below Select edition. Click Windows 10 in the Windows 10 Anniversary Update section. You can download the Creators Update through Windows once it is installed. Click Confirm. Dec 10, 2019  Install Windows 10 on your Mac with Boot Camp Assistant - How to install Windows 10 on Mac If you're asked to insert a USB drive, plug your USB flash drive into your Mac. When Boot Camp Assistant asks you to set the size of the Windows partition, remember the minimum storage-space requirements in.

  • 2 Contributors
  • forum 1 Reply
  • 402 Views
  • 31 Minutes Discussion Span
  • commentLatest Postby mike_2000_17Latest Post

mike_2000_172,669

Dev C++ Undefined Reference To Winmain 16

Undefined Reference To Winmain 16 Mingw

Make sure you select 'Console Application' in your project's configurations. The WinMain function that is missing from your code is the 'main' function that is expected from a GUI Win32 application. If you select 'console' application, it should be looking for the 'main()' function, which I presume you have defined in your 'main.c' file.