Compiling AesCrypt on Windows 10 using MinGW
Posted: Sat Mar 09, 2019 10:00 am
Hello to all,
I am trying to compile aescrypt (just console version) in Windows. I produced the *.o files:
aes.o aescrypt.o password.o getopt.o password.o sha256.o
and after I tried to compile to target including all these object files but I receive:
c:\MinGW\bin>gcc -o target.exe AESCrypt_source_v310\Console\*.o
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
I see that main is present in aes.c file. What could be the problem?
Thank you.
I am trying to compile aescrypt (just console version) in Windows. I produced the *.o files:
aes.o aescrypt.o password.o getopt.o password.o sha256.o
and after I tried to compile to target including all these object files but I receive:
c:\MinGW\bin>gcc -o target.exe AESCrypt_source_v310\Console\*.o
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
I see that main is present in aes.c file. What could be the problem?
Thank you.