Welcome! Log In Create A New Profile

Advanced

Error: undefined reference to `WinMain@16

Posted by conman 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Error: undefined reference to `WinMain@16
April 26, 2010 12:49AM
Error message: "undefined reference to `WinMain@16"

Has anyone ever seen this error message when compiling and running a project?

After looking around on the net and what I initially thought was the reason for the error was that I had not specified the int main() function in the project. After adding a file with the main() function to put in my test code I still receive the same error... Any ideas?

cheers,
Conor
Re: Error: undefined reference to `WinMain@16
April 26, 2010 01:16AM
Ignore above post.. The solution above is correct.. Helps to spell "main" correctly!! smiling smiley
Re: Error: undefined reference to `WinMain@16
April 26, 2010 10:03AM
Yeah man dyslexia is a cunning adversary, I've had my fare share of wasted time due to it smile
Re: Error: undefined reference to `WinMain@16
July 20, 2010 02:55PM
conman Wrote:
-------------------------------------------------------
> Error message: "undefined reference to
> `WinMain@16"
>
> Has anyone ever seen this error message when
> compiling and running a project?
>
> After looking around on the net and what I
> initially thought was the reason for the error was
> that I had not specified the int main() function
> in the project. After adding a file with the
> main() function to put in my test code I still
> receive the same error... Any ideas?
>
> cheers,
> Conor


I received the same error message when compiling my library, may you clarify your solution because I searched almost all the files to check if I mispelled main but could not find any file with main function. I did not recieve Disk 2010 and I have written to Dispatch several time but the best I could get was the promise. On my first assignment I was punished very hard for submitting codes without outputs and could not submitt assignment two and my whole life rest on assignment 3 with the downloaded version of QT
avatar Re: Error: undefined reference to `WinMain@16
July 20, 2010 03:33PM
Firstly, The entire CD is available from Osprey. You can download the files you need.

Secondly, if you can't find a single file with a function called main, then that's your problem, all c++ programs require such a function.

Lastly, check that your compiler spec is the correct one.

eg. If you're using mingw as your compiler, and the configuration is set to the microsoft compiler, then qmake will create the wrong makefile.
Re: Error: undefined reference to `WinMain@16
July 27, 2010 03:47PM
robanaurochs Wrote:
-------------------------------------------------------
> Firstly, The entire CD is available from Osprey.
> You can download the files you need.
>
> Secondly, if you can't find a single file with a
> function called main, then that's your problem,
> all c++ programs require such a function.
>
> Lastly, check that your compiler spec is the
> correct one.
>
> eg. If you're using mingw as your compiler, and
> the configuration is set to the microsoft
> compiler, then qmake will create the wrong
> makefile.

Firstly I always thought that the Disk2010 on Osprey just gives you the interface where you can dowload the files. It has never dawn in that it was an entire CD hence as I access it I was linked to the website to download the QT I am currently using anyway that you for the info it is worthwhile.

Secondly it was my understanding that for a Library to compile you will need a Header file and a Source Code without necessarily having the main function however this confirm that you learn till you die, isn't that owesome. Very thank you for your great mind.

Lastly I have just learn that Windows7 (as I'm currently usinf it) tend to give some error message and the best is to make sure that I link my file and directories correctly for which it is still working correctly. However I will still chech the configuration as stated
Sorry, only registered users may post in this forum.

Click here to login