User forums > Help
undefined reference to `WinMain@16' ??????
(1/1)
fouzimedfouni:
each time I compile i get that : main.c||undefined reference to `WinMain@16'|
whats the problem here ?
thank you
MortenMacFly:
Nobody will/can help you if you don't state at minimum:
- OS
- version of C::B and compiler
- steps to reproduce
- example code snippets
- full compiler log
Please keep that in mind for future posts. Thank you.
fouzimedfouni:
- OS ------------------------------------>Win 7
- version of C::B and compiler -----> 13.12
- steps to reproduce ---------------->?
- full compiler log -------------------->main.c||undefined reference to `WinMain@16'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
- example code snippets ---------->
--- Code: ---
#include <stdio.h>
#include <string.h>
struct Books{
char title[50];
char author[50];
char subject[100];
int book_id;
};
typedef struct Books TTT;
print_book(TTT *book){
printf(" here is your value of the function of the STRUCT :%i", book->book_id);
int main( )
{
TTT *livre;
TTT MNB;
livre= &MNB;
//livre->book_id = 123;
print_book(livre);
}
printhello(TTT *boo){
printf("Enter your book # here please :");
scanf("%i",&boo->book_id);
printf("your boo book_id is : %i\n\n\n\n\n\n\n\n\n\n", boo->book_id);
}
--- End code ---
BlueHazzard:
--- Quote from: fouzimedfouni on March 30, 2015, 08:19:23 am ---- full compiler log -------------------->main.c||undefined reference to `WinMain@16'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
--- End quote ---
This is not the full build log.
Hit rebuild: Build->Rebuild
and post the log from the Build Log tab
greetings
gd_on:
More.
Your code seems to be a standard c console application, not a Windows 32 application. You have probably chosen the wrong template and it's why Winmain is asked.
Try first with the simple console application (simple hello program).
gd_on
Navigation
[0] Message Index
Go to full version