Тема: libmingw32.a(main.o):(.text.startup+0xa7)||undefined reference to `Win
Доброго вечора! Я спробовую скомпіляти щось таке
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
void _tmain(int argc, TCHAR *argv[])
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
if( argc != 2 )
{
_tprintf(TEXT("Usage: %s [target_file]\n"), argv[0]);
return;
}
_tprintf (TEXT("Target file is %s\n"), argv[1]);
hFind = FindFirstFile(argv[1], &FindFileData);
if (hFind == INVALID_HANDLE_VALUE)
{
printf ("FindFirstFile failed (%d)\n", GetLastError());
return;
}
else
{
_tprintf (TEXT("The first file found is %s\n"),
FindFileData.cFileName);
FindClose(hFind);
}
}
||=== Build: Debug in directory2 (compiler: GNU GCC Compiler) ===|
D:\Build\directory2\directory2.cpp||In function 'void _tmain(int, TCHAR**)':|
D:\Build\directory2\directory2.cpp|20|warning: format '%d' expects argument of type 'int', but argument 2 has type 'DWORD {aka long unsigned int}' [-Wformat=]|
c:\mingw\bin\..\lib\gcc\mingw32\4.9.3\..\..\..\libmingw32.a(main.o):(.text.startup+0xa7)||undefined reference to `WinMain@16|
||=== Build failed: 1 error(s), 1 warning(s) (0 minute(s), 14 second(s)) ===|
Чому і що?? Будь ласка, роз яснить!