Background
Let us compile TimeWindows using MinGW.
Timeline
- TimeWindows:- Compilation Using Microsoft Visual Studio
Link
Outline
- Identify Source Code Repository
- Download Code
- Uncompress Package
- Examine & Prepare Artifacts
- Build Application
Tasks
Identify Source Code Repository
Download Code
Download compressed file.
Its name is source-archive.zip.
Extract
Extract from the compressed package.
The important folder is time-windows\trunk.
Image
Textual
- icon.png
- TimeMem.c
- TimeMem.sln
- TimeMem.vcxproj
- TimeMem.vcxproj.filters
Prepare Artifacts
icon
icon – icon.png
Outline
Using online tools or desktop applications, please convert the image files.
Resources
Used any of the following resources to convert the .png file to an .ico file
- icoconvert.com
- ConvertICO.com
Usage
Convert icon.png to icon.ico
resource file
resource file – TimeMem.rc
Source Code
id ICON Timemem.ico
Image
Build
resource file
Outline
- Invoke windres ( resource compiler )
- output format
- coff
- source file
- Indicate resource file
- In our case TimeMem.rc
- Indicate resource file
- Output file
- Indicate file output
- In our case _stage\TimeMem.res
- Indicate file output
Code
Syntax
windres --output-format coff [file.rc] [file.res]
Sample
windres --output-format coff TimeMem.rc _stage\TimeMem.res
source files
Outline
- Invoke gcc ( compiler )
- Compiler Directives
- -c
- source file
- Indicate source file name
- In our case TimeMem.c
- Indicate source file name
- -o
- Indicate file output
- In our case _stage\TimeMem.o
- Indicate file output
Code
gcc -c TimeMem.c -o _stage\TimeMem.o
build
Outline
- Invoke cl ( compiler )
- Object files
- List Object Files
- stage\TimeMem.o
- List Object Files
- Resource files
- List Resource Files
- stage\TimeMem.res
- List Resource Files
- -o
- Indicate output file
- In our case bin\TimeMem.exe
- Indicate output file
- Link Libraries
- -l
- psapi
- -l
Code
gcc _stage\TimeMem.o _stage\TimeMem.res -o bin\TimeMem.exe -lpsapi
Source Code Control
GitHub
Repository => https://github.com/DanielAdeniji/timeWindows
Dedicated
Same Dedication as last time!
Dedicated to all these men and women who put in the work!
Here Dude did not even put his or her name on the source code.
References
- caiorss.github.io
- CPP / C++ – Embed Resources Into Executables
Link
- CPP / C++ – Embed Resources Into Executables
- Microsoft
- Thought.co
- Zarko Gajic
- How to Embed Media Files into a Delphi Executable (RC/.RES)
Link
- How to Embed Media Files into a Delphi Executable (RC/.RES)
- Zarko Gajic
- Stack Overflow
- Undefined reference to getprocessmemoryinfo@12
Link
- Undefined reference to getprocessmemoryinfo@12
- Aaron Stannard
- Win32 Errors: How to Format GetLastError() Output into Readable Strings
Link
- Win32 Errors: How to Format GetLastError() Output into Readable Strings