I have this code:
after that there is a bunch of case statements that are irrelevent. My problem is that after compilation if gives this error
int main( int argc, char **argv )
const char *baudStr = NULL;
const char *portStr = "com1";
PKT_TextChar = PacketTextChar;
PKT_SendChar = PacketSendChar;
PKT_PacketReceived = PacketReceived;
LogInit( stdout );
while (( opt = getopt_long( argc, argv, "b:dhmp:sv", gLongOption, NULL )) > 0 )
switch ( opt )
"error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup"
I have looked at a few different pages and I cant seem to figure out how to write this so that it works. I know about WinMain and its parameters, but my main function has its own parameters and I dont know what to do with those. Any help would be greatly appreciated!
Recreate your project as a console project, not as a GUI project.