Compiling AesCrypt on Windows 10 using MinGW

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
thecode
Posts: 2
Joined: Sat Mar 09, 2019 9:44 am

Compiling AesCrypt on Windows 10 using MinGW

Post 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.
User avatar
paulej
Posts: 595
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Compiling AesCrypt on Windows 10 using MinGW

Post 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.
thecode
Posts: 2
Joined: Sat Mar 09, 2019 9:44 am

Re: Compiling AesCrypt on Windows 10 using MinGW

Post 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.
Post Reply