How to use Mingw graphic library in DEV-C++? - c++

I am using MinGW64 for compile my codes.
How to use the graphics library in Dev-C++(MinGW64) in Windows?
Or write a simple example?

Dev-C++ hasn't released any new versions in the last 7 years. I think this software was abandoned. I used Dev-C++ a long time ago to, but I switched to Code::Blocks and I remember the transition was very smooth.
I made a short explanation on how to configure MinGW-w64 in Code::Blocks at https://winlibs.com/#usage-codeblocks and I assume it should be quite similar in Dev-C++.
As for graphics.h: this is not part of MinGW-w64, but the following projects provide it:
SDL_bgi: https://sdl-bgi.sourceforge.io/
winbgim: http://winbgim.codecutter.org/
Both these packages can be built with MinGW-w64.

Related

Eclipse for C++ Windows 7 64-bit PC

I am using 64-bit Windows 7 PC and I want to develop C/C++ programs using Eclipse IDE.
I have tried DOSBox but it was not working for me. Also, I din't liked it as well.
I just want to use Eclipse for the same. I tried using CDT Plugin in Eclipse but that doesn't worked.
When I create a new C++ project, there are different Tool Chains available - Cross GCC, Microsoft Visual C++, MinGW GCC. I really don't know what exactly it is. I tried all but I am getting error and snapshot attached :-
Basically, it is not able to detect what iostream, stdio, cout is.
I tried different solutions available on other posts but none worked for me.
I don't know what to do with it. I know I am having problem due to 64-bit Windows but I want to fix this now. Please help!
You need to install MinGW, and then select the MinGW toolchain when selecting a new project.
Well I tried different tool chains on Eclipse IDE, but nothing worked.
Then I installed CodeBlocks IDE and plugins for the same as well.
Sic: Now, I am running C/C++ codes on Code Blocks perfectly.
You need to download MinGW and install the C++ compiler, don't forget to add the MinGW bin to the system variables under "path".
I recommend you using Visual Studio Code. If you do install Visual Studio Code, make sure to install Code Runner plugin to make running C++ projects easier.

Differences between Mingw-w64 and TDM-GCC for a simple GDI project

I need to build a simple non-commercial tool (dealing with Windows GDI API) on Win64 for Win64 (no cross compilation). MinGW seems the best option for me.
I have already used the 32 bit version in the past, as for 64-bit, can you tell me the main differences between the following builds?:
Mingw-w64
TDM-GCC
Besides the classic MinGW32 used a straightforward tool, mingw-get.exe, to customise the setup and keep up with the updating cycle. Which is the equivalent now?
I've posted a short overview of MinGW / MinGW-w64 / TDM-GCC here: What is the difference between Orwell's MinGW and TDM Dev-C++ versions?
Which is the equivalent now?
It seems, there's no MinGW-W64 version of mingw-get; not sure if this is still valid. However, MinGW-w64 contains a nice installer.
Btw. MinGW-w64 is not just a "64 Bit port of MinGW" - it's more.
This is a late answer, but I have this same question and I was looking for by many hours and this is what I found...
I think that this link can to expand our view of the differences that include every distro, although the recommendation summary is based in their UI framework library (Qt 5)...
http://qt-project.org/wiki/MinGW-64-bit

How do you compile WebkitGTK on windows for MinGW

My experience with C++, GCC, MinGW and Cygwin is very limited. However, I already tested it and realized that Cygwin is not the ideal solution for what I am trying to do. Even though a GTK+ program with GTKWebkit works fine on Cygwin, it's not that great in terms of packaging the final project to a single .exe. The dependency on the cywin1.dll, etc... is a deal breaker.
I tested MinGW and it works flawlessly for a standard GTK only application in Windows. And the file size is great!
I tested a standard GCC compiler to compile a GTK & WebKitGtk application on Mac and it worked flawlessly.
But in the windows world where I am getting confused with GTK and WebkitGTK. What I want to do is compile a sample WebkitGTK application on Windows using MinGW. So, all the required libraries are statically linked and has a single .exe.
What are my choices? How do I actually build WebsiteGTK on Windows? Please give me the tools and as much details as you can.
FYI, QtWebkit is not going to cut it. Their licensing terms are not that commercial friendly.
I never did get WebKitGtk to compile on Windows. I think I could have got it to work using cygwin, but that's a non-starter for the project I'm working on.
I ended up using Chromium Embedded Framework instead: https://code.google.com/p/chromiumembedded/. It has clear instructions and sample apps for Mac, Linux, Windows, and mobile.
Here someone says that the easiest way to do that it's to cross-compile from virtual machine. Actually, there is binary there.
He uses OpenSUSE booted through VirtualBox. Then, using osc tool, get the mingw32-webkitgtk from windows:mingw:win32 and build it with osc.

Tesseract + OpenCV + linux

I have developed an OCR application on Windows using OpenCV and Tesseract. Now all I want to do is to write same application over Linux (Ubuntu 12.10) in C++. And I don't have any experience in Linux development. I don't know where to start. All I want is developing environment in which I would able to link these two libraries OpenCV and Tesseract.
Please suggest me. I have tried searching Google but failed. Maybe I am not searching with good keywords. As I am totally new in Linux
First make sure that you compiled OpenCV on your system, as OpenCV's linux bundle hasn't got pre-compiled libs (unlike Windows bundle). Follow this tutorial.
For a starting point, build up Eclipse as IDE and follow this tutorial. It shouldn't be so hard to adopt if you already used Visual Studio (MSVC Windows compiler).
Later on, it would be wise to learn about gcc (official linux compiler for your c++ code) and its syntax, and maybe together with CMake. Because learning the terminal and g++ syntax suddenly accelerates the development process. Linux has got many opportunities for a developer, such as pkg-config, which links all the libs and headers automatically (well, almost). You can also go for learning CMake for cross platform development and let it use "gcc" by default; example here.
Also note that, using cygwin, you can actually compile & build linux binaries on a Windows platform. For the opposite; check MinGW.
Good luck.
EDIT: other cross platform solutions
VisualGDB
Qt

boost asio giving You must add -D__USE_W32_SOCKETS to your compiler options on cygwin

I was trying to use the boost library first time. Using as an environment Eclipse 4.3 with CDT and as compiler gcc 3.4 and boost 1.53.
I was browsing various sites to find info on how to setup boost, but it doesn't seem to work. When I compile trying to include boost/asio.hpp I get the error:
You must add -D__USE_W32_SOCKETS to your compiler options
However, I don't want to use windows sockets, I want to use posix, so I don't really know what is wrong. As I need the project to run on HP-UX later, I dont want to get to Windows specific. If I use now windows sockets will the program later be easily portable to Unix, or are all the details encapsulated in boost, and I don't have to care anyway?
I tested a simple testprogram using FOREACH loop to confirm that boost itself works, and this is the case.
I also found this: https://svn.boost.org/trac/boost/ticket/7881 so does it mean that this problem is currently currently not supported, or am I doing something wrong?
It seems what you're trying to do is not supported by the library, the documentation states the following under supported platforms
The following platforms and compilers have been tested:
Win32 and Win64 using Visual C++ 7.1 and Visual C++ 8.0.
Win32 using MinGW.
Win32 using Cygwin. (__USE_W32_SOCKETS must be defined.)
Linux (2.4 or 2.6 kernels) using g++ 3.3 or later.
Solaris using g++ 3.3 or later.
Mac OS X 10.4 using g++ 3.3 or later.
added emphasis is mine. If that's not possible, you might try the patch suggested in the linked ticket. However, grepping through the source code I see several occurrences of #if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) so it's not obvious that simply patching io_service.hpp will resolve anything. You might try adding -U__CYGWIN__ to your CXXFLAGS, though the cygwin toolchain may not like that.
Full disclosure: I am not a Windows guy so hopefully someone else will chime in.
The libboost-devel package in the Cygwin distribution includes patches to not use Winsock on Cygwin in Boost.Asio. I suggest trying that in conjunction with the gcc4 packages, which provide more recent versions of GCC.