I'm trying to get my code to compile. I have 3 files: a header file, a cpp file for my main function and another cpp file for my other functions.
When I try to compile my cpp function file, I get the error Undefined reference to 'WinMain@16 and when I try to compile my main function file I get undefined reference to function name.
I am using code blocks.
Jump to Post
Probably something is wrong with your includes. In code::blocks, when you add a new file to a project you need to mark them to be included, otherwise you will get an error when you try to compile it. Add them to the project again, or include them manually. - Include …
All 4 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.