Page 1 of 1

Compiling AesCrypt on Windows 10 using MinGW

Posted: Sat Mar 09, 2019 10:00 am
by thecode
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.

Re: Compiling AesCrypt on Windows 10 using MinGW

Posted: Sat Mar 09, 2019 3:06 pm
by paulej
It looks like you're trying to build the Windows version. Did you try building the Linux version?

I'm not familiar with MinGW (preferring to just build natively on Windows using Microsoft compilers), but I know some people did work on that using the code in GitHub. The GitHub version also has some aesthetic improvements. See: https://github.com/paulej/AESCrypt.

All official builds come from the source version posted on aescrypt.com, though. I've not personally verified every change committed to the GitHub repo.

Re: Compiling AesCrypt on Windows 10 using MinGW

Posted: Sat Mar 09, 2019 4:20 pm
by thecode
Thank you for your fast reply. You was right the worng thing was that I was trying to compile windows source code.
However, Linux code cannot compile as password.c requires termios.c and langinfo.c and the first is not supported in MinGW as it is not POSIX complaint, the latter can be found by third party but, as the first is not available, no need to check for the latter.
Anyway, thank you.
Stefano.