PNG Support for Emacs - emacs

I was trying to add PNG support to my Emacs installation to display png files. Though I found the following and some other links online, I'm still not able to view png files.
Emacs under Windows and PNG files
I have copied libpng and zlib1 dll files in my emacs/bin directory and have made sure that they are not outdated but the
(image-type-available-p 'png)
returns nil. I would like to know if I'm missing something.
I am using Emacs 24.4 on Windows 8.1 64-bit.
Any help is appreciated. Thanks.

From https://ftp.gnu.org/gnu/emacs/windows/
Emacs can also support some other image formats with appropriate libraries. These libraries are all available on the following sites:
http://sourceforge.net/projects/ezwinports/files/
-- leaner, more up-to-date builds, only for 32-bit Emacs
http://www.gtk.org/download/win32.php
http://www.gtk.org/download/win64.php
-- the GTK project site; offers much fatter builds, but includes
64-bit DLLs (from the 2nd URL)

Related

Problem with setting up Mingw w64 for C++. Possible conflict with existing Anaconda/Jupyter?

While I am setting up MinGW-W64 (from sourceforge) exe file (for Windows 10) for C++, it shows a message that it was not downloaded correctly. My best guess is that I have a Anaconda/Jupyter setup having MinGW-W64, and it is making all the fuss. How to set it up for both C++ (VS Code / Code lite) and Python/Jupyter/Anaconda?
Make sure you don't mix versions in environment variables like PATH.
Maybe your download was bad?
Or you may have an antivirus software preventing the installation...
You could try a standalone MinGW-w64 build from https://winlibs.com/, which doesn't requite installation - just extract the archive and point VSCode to it.

LNK1104 when using MASM 64bit

I'm currently trying to learn Assembly for x64 Windows. I tried the example code from this Intel website,
but whenever I try to compile it with the command given in the document:
ml64 hello.asm /link /subsystem:windows /defaultlib:kernel32.lib /defaultlib:user32.lib /entry:Start
I always get an
LNK1104 error
I know that it means the compiler can't find the library file, I googled the problem and quickly found that I need Visual Studio with Windows SDK, which I downloaded and installed. But still can't find a kernel32.lib or user32.lib in any files other than the Windows system files.
I tried everything and I simply can't fix it. I hope someone could help figure this out.
There is a well-known MASM32 SDK available created by hutch--. This package contains the requested libraries in a (legacy) 32-bit version.
But there is also a 64-bit update of that famous package by hutch--:
Current build of the 64 bit MASM SDK.
It should contain the .inc and .lib files you need and more...
This is the current build of the 64 bit MASM SDK. This one is a lot closer to complete and with the correct Microsoft binaries added to it, it is capable of building a wide array of application types. It can be use in 2 different ways, it should be unzipped from the root directory of the partition that it is being installed on. You can either manually add it to an installation of the MASM32 SDK OR you can install it on a partition that does not have MASM32 on it and simply rename the buildx64 directory to MASM32. Installing it on another partition is the preferred technique as QE has its menus and accessories set up for building 64 bit code.
You still need to add the Microsoft binaries which would typically be from an installation of vs2017 or from an earlier version for Win7 64. In the bin64 directory there is a file called "Microsoft_File_List.txt" which shows the files you need. The list is from the current version of Visual Studio 2017 version and if this is the version you have, use the ML64 from the "x86_amd64" directory that is 402,584 bytes in size.
In the "buildx64" directory is a batch file called "makeall.bat". This must be run to build all of the libraries and include files.
They are the gold standard of Windows assembly developing.

GTK+ via MSYS2 with CodeBlocks

Might be a dumb question, but how to use GTK+ (or its language bindings) with CodeBlocks in Windows? Official site gtk.org shows downloading after installing msys2, via pacman. After doing that and adding C://msys64/mingw64/bin to variable path the CodeBlocks still doesn't "see" gtk header files in include since they're in gtk-3.0/gtk/ instead of gtk/. I thought to myself that I should move files one dir up, but then after finding gtk header files, CodeBlocks is unable to find its dependencies (since they are also in some gdk-pixbuf-2.0/gdk-pixbuf instead of gdk-pixbuf/).
I was able to find gtk-bundle in some third party site, which contains all needed files and headers. After extracting them into C://gtk/ and adding it to variable path I was able to get started with gtk. However after trying to get gtkmm (C++ binding for gtk) I've ran into same problem, install only via msys2, but unfortunately no bundle archive could be found.
Any help regarding how to use libraries installed via msys2 properly would be great. Thanks in advance.
For further usage. So after long searches and tries I've found a solution to my problem.
After installing GTK+ (or any of language bindings) via msys2 what you need to do is to use 'pkg-config gtk+-3.0 --cflags --libs > link.txt' in cmd (first cd to convenient location), this will generate .txt file with linker settings. Copy all content to CodeBlocks > linker settings. And that's where the boring part comes in. In order for CB to find all headers and dependencies, need to add all folders listed in .txt file needs to be added to CB > Search Directories.
These were the steps that allowed me to compile GTK+ and gtkmm wit CodeBlocks.

IDA Pro Windbg Commands do not work

first things first:
It was working when I used it last time (which is about more than a month ago).
The Problem is, that no command which is from an extension is working, it seems like no extension is loaded.
Only the default commands do work (like version etc.)
The output of the command "Version" is:
Extension DLL chain:
dbghelp: image 6.2.9200.16384, API 6.1.6, built Sat Nov 20 12:57:48 2010
[path: C:\Windows\system32\dbghelp.dll]
ext: (Not loaded)
wow64exts: (Not loaded)
exts: (Not loaded)
uext: (Not loaded)
ntsdexts: (Not loaded)
It says that no extensions were loaded, but the folder winext does exist in my system32 folder (C:\Windows\System32\winext), where the extensions are located in (as far as I know).
Commands like !gle do not work :/
I really have no Idea what I can do, please help me :)
Does the DBGTOOLS definition in your IDA.CFG point to the x86 WinDBG installation directory?
The following comes from IDA Pro's help:
Windbg debugger plugin has the following configuration options:
- The Debugging Tools folder: This should be configured to point to the same
folder where Microsoft Debugging Tools are installed. The plugin will try to
guess where the tools are, but if it fails, a manual intervention will be
required. If this option is not set, then the plugin will try to use dbgeng.dll
from MS Windows system folder, while normal debug operations will work,
extensions will not.
This information indicates that if IDA Pro is using dbgeng.dll from the Windows system folder, the extensions command (like !gle) will not work.
If you have already setup the DBGTOOLS to point to your WinDbg (x86 version) directory correctly in your /cfg/ida.cfg but IDA Pro is still using dbgeng.dll from your Windows system folder, then probably your IDA context is not configured to analyze the IBM PC processor. This may happen when you launch IDA Pro and click the 'Go' button directly to work on your own and start the WinDbg debugger.
Check the DBGTOOLS in the ida.cfg, you will find it is wrapped by #ifdef __PC__ #endif.
The __PC__ will only gets defined by IDA Pro if you are analyzing a Windows EXE file for example. Give a try to launch the WinDbg from the IDA Pro menu after you have successfully disassembled a Windows EXE file and see what happens.
If this still hasn't been answered your problem is most likely that you didn't uncomment the DBG Tools line in the ida.cfg file.
I just fixed this myself. hope this helps.
Also the other guys are correct as well. make sure you are escaping with double back slashes "\\" and make sure you pointing to the (x86) directory.

Ada: windows installation

When downloading the tar file from AdaCore for the GNAT compiler (the libre version), I noticed that there are two exe files for installation purposes:
win32ada-gpl-2010.exe of size 2.67 MB
and
gnat-gpl-2010-i686-pc-mingw32-bin.exe of size 70.2 MB
In the folder containing the second one, there are instructions for the installation and it installs the GPS editor as well.
I have Win XP and chose to install the second exe file. Now I'm thinking that the second one is for a MINGW installation whereas the first exe file is for a native Windows installation. But I can't find information for this. Which of the two exe files is for a normal Windows installation?
Thanks a lot...
Win32Ada I believe is just a set of Win32 bindings for Ada. That's why it is so much smaller.
You might download that if you want to do a lot of Win32 systems programming or GUI work, and don't have a set of higher-level bindings (eg: GTKAda)