C and C++ Cross Compiling from Arch Linux to Windows - c++

I can't install mingw-w64-gcc in Arch linux, so i can't compile my .cpp files for Windows...
I have aldready tried wineg++, but it isn't good for me...
Anyone can help me?
Thanks

Assuming that what you want is to install mingw-w64-gcc in Arch, the steps you need to do are:
1) go to: https://aur.archlinux.org/packages/mingw-w64-gcc/ and download a snapshot (on the upper right side of the web page).
2) decompress the file with tar xzvf /your_path/mingw-w64-gcc.tar.gz.
3) install the package. cd mingw-w64-gcc/ && makepkg -si.
You may need to install other dependencies from the Arch User Repository (AUR).
Hope you find this helpful.
For future questions related with Arch Linux issues I would recommend you first to search in the Arch Wiki, and if you cannot find a solution, then use the Arch forums.
PS: Let me also suggest you to use Docker for making your code executable anywhere. It's quite simple to use when you learn it.

Related

How to install Qt 3.3.8 in Ubuntu 14.04

Just recently I have begun to review the code for a project produced by a friend roughly 4 years ago. However, to compile this project I need an outdated version of Qt (version 3.3.8). Much of the code used in this project isn't supported in the same style as Qt4. So I'd first like to obtain Qt3 before I transition to Qt4.
Ubuntu has decided to no longer carry "qt3-dev-tools". Ubuntu has limited the selection to "qt4-dev-tools" in its repository. So installing via the command line option (sudo apt-get install qt3-dev-tools) results in an error:
"Unable to locate package qt3-dev-tools."
So, from here I did some digging for a manual installation? I found a great website to help me through the process, but I'm not very knowledgeable about Ubuntu, or Linux in general. Step 1 was simple. But step 2 and onward stumped me. I'm supposed to be both adding the environment variables listed in step two to the .profile file and then setting them, correct?
In step 2, is logging in again just meant for users with the .login shell? When I type in $HOME/.qt-license of step three, I suppose I'm typing this into the terminal?. Same with the ./configure? Both of these commands return no such file exists.
Does anyone know a better walk through to install Qt3 files, or can give a quick breakdown of this tutorial?
The website tutorial:
http://krm.am.gdynia.pl/doc/qt-3.3.8/INSTALL
If u can get .rpm package then open it in ubuntu software centre . It will get installed.
http://download.qt.io/archive/qt/3/ try downloading the package for qt3 from this qt archive & install it.

dicom3tools compiles with missing application pbmtoovl

I've downloaded dicom3tools in Ubuntu apt-get install dicom3tools, but certain apps are not present.
I've downloaded the source and compiled according to directions on Ubuntu without errors. I have access to most of the apps in the kit, but some just seem to be missing or not compiling.
I need a working binary copy of the pbmtoovl tool from this kit.
Can anyone help me?
Do you know why it is missing?
Do I need to compile differently?
Do you have a copy of the pbmtoovl app pre-compiled?
There is no info on this anywhere on the web, I have nowhere else to turn.
Thanks in advance for any info on this.
Please please help me with this.....
I edited the proper file with a uid.
I ran
imake -I./config -DInstallInTopDir -DUsemyID
and everything looked fine.
make World.
make install
make install.man,
but still no rawtodc or pbmtoovl or any of the dicom creation tools. I really need these tools. Please let me know what I'm doing wrong. On Ubuntu 14 –
I am the author of the dicom3tools debian package. The explanation is given online here.
When you install a debian package, you are required to read the documentation. In this case the documentation was available on your system from:
$ cat /usr/share/doc/dicom3tools/README.Debian
So you'll need to follow the build instructions yourself (see INSTALL):
Edit config/site.p-def to set your UID root (a la UseClunieID, to be
selected with a UseXXXXID define on the imake command line).
NB. Don't ever use any UseClunie*ID or your instances
will conflict with mine !
./Configure
setenv IMAKEINCLUDE -I./config # only needed for suns
imake -I./config -DInstallInTopDir -DUseXXXXID
make World
make install # into ./bin
make install.man # into ./man
I finally did a fresh Ubuntu install, installed xutils, g++, gcc and ran the compiling instructions. It did not install, again, but this time I did have a new directory in bin ending in 'unknown' that miraculously contained all of the compiled binaries. I added that dir to the PATH and VOILA I can access all the tools from the command line....
It's still a problem, but I can now use pbmtoovl

Installing boost in debian (for Codeblocks)

I'm currently working on a project that I've been assigned. I'm going to program a gateway (also known as a router). I have a virtual setup with 3 virtual machines (3 debian 7.1 devices).
The first one represents the gateway (the router) and the two other represents two clients (computers) who are going to transmit information between each other, through the gateway. The two clients have static IP's for the virtual representation.
I have installed Code::Blocks for Debian on the gateway, and I'm planning to program this all in C++ (or C). I have not made up my mind entirely, but I plan to use C++ as for now.
I've searched around a little to find out how to create sockets in C++ so I can start getting a grip on stuff and start looking on some packets which I will send from Client1. There's a lot of different libraries it seems, but Boost is pretty much preferred as far as I've found. I can't quite get a grip on how to install boost for Debian and use it in code blocks, so if someone could explain it low tech wise for me..?
I've downloaded the most recent version of Boost and extracted it somewhere on the gateway. How do I install it and make it work for Codeblocks?
Thanks!
Integrating Boost in to Code::Blocks is beyond my ken, but here is how I acquire and install Boost under linux. This is particularly for version 1.54.0, but you can adjust for whatever version you prefer:
mkdir -p ~/dev/boost
cd ~/dev/boost
wget http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz
tar -zxf boost_1_54_0.tar.gz
cd boost_1_54_0
sudo ./bootstrap.sh
sudo ./b2 install
sudo ln -s /usr/local/include/boost_1_54_0/ /usr/local/include/boost
http://tuxarena.blogspot.in/2009/01/how-to-compile-and-install-codeblocks.html
The above link would be helpful.
Thanks & Regards,
Alok Thaker

Using RakNet source with Code::Blocks on Ubuntu

Hey Forum,
So i'm trying to find out how to use the source files from RakNet with Code::Blocks, in Ubuntu. All the tutorials on the internet are for windows, or use windows ".lib files". I need to find a way to get this working but I'm getting very discouraged since this is my third day in a row that has been without result.
If anyone can help me at all I would greatly appreciate it.
Thanks in Advance,
Dan Chevalier
U should install src, headers & libs
download it here http://www.raknet.net/raknet/downloads/
try in console:
unzip RakNet-3.*.zip
cd RakNet-3.*
./bootstrap
./configure
make && sudo make install

learning c++ on linux mint ( for .net developer )

My goal is to hop on to C++ programming language by doing a homework project on linux mint and learn some linux & c++ at the same time.
I intend to write a small desktop application to show current network traffic ( like DU meter in windows). I have following questions:
I noticed in mint there is an application called 'System Monitor' which also shows network history with info and graph like current download/upload of data and speed. Is it a good idea to get started by looking at the code for this ? how can I find the code for same in mint and dig into it ? pls help with some steps here if possible.
what tools do I need here for writing c++ application for/in linux mint ?
Which GUI library to use ( like in c# winforms , it offers user controls as part of GDI lib) on linux mint what do we have that offers user controls like window/button/panel/etc ?
Links to beginner level tutorials will be helpful.
Hoping NOT to re-invent the wheel completely here. Would love to re-use some lib that do the network traffic part, ideas ?
PS: i know this post reads 'wanna be' - I am really excited to kickstart with some c++. Will rephrase this post with more precise questions.Hunting in the dark at this point being a c# developer totally spoiled by windows.
Thanks in Advance!!! for tips on this...
The mint distribution is based on Ubuntu/Debian, so I assume that my Ubuntu approach also works on mint.
First
you need some tools, libraries and headers:
# install the standard toolchain (g++, make, etc.)
sudo aptitude install build-essential
# install the build dependencies for a desktop based networking tool
sudo aptitude build-dep gnome-nettool
Optionally
because you mentioned the system-monitor - it might be helpful to build the gnome-system-monitor from source:
# install the build dependencies for gnome-system-monitor
sudo aptitude build-dep gnome-system-monitor
# get the sources for the gnome-system-monitor
mkdir example
cd example
apt-get source gnome-system-monitor
# build the gnome-system-monitor
# note: you might have a different version. But I'm sure you get the idea ;-)
cd gnome-system-monitor-2.28.0
sh configure
make
Finally
you need something to develop and debug. A lot of unix developers recommend emacs or vi(m). But my personal opinion is that you should start with a "modern" GUI based IDE.
here's a collection of some commonly used IDEs:
Eclipse with CDT
NetBeans
Code::Blocks
Anjuta (was this used to develop the gnome-system-monitor ?)
CodeLite (which is my personal favorite)
see also: discussion on SOF regarding "the best" C++ IDE for Linux
People usually use text editors like (g)Vim or emacs to write C++ applications. If you've never seen them before they may be a bit overwhelming. You can also use IDEs like Geany, Anjuta, QtCreator, Eclipse...
I think the default desktop environment in Mint is GNOME which uses the GTK library. You could use GTK for your application. It is written in C but there is a c++ interface for it, gtkmm, and a tutorial for it on the projects site.
There is also Qt, which is the base of the K Desktop Environment or KDE. It is a very large library and has a pretty good IDE written in it, for it, QtCreator.
Finally, you should search stackoverflow because most of your questions have already been answered.
In answer to you "what tools do I need", you should at a minimum install g++, the standard C++ compiler on a GNU/Linux system.
Linux Mint is based on Ubuntu (which is in turn based on Debian), so for a binary like gnome-system-monitor, the command
apt-get source $(dpkg -S $(which gnome-system-monitor) | cut -d: -f1)
will download and unpack the source package for it in the current directory. Note that it probably depends on a number of libraries, that can be found in different packages. You can see what these are with apt-cache show package_name, and libraries often have associated development packages named with -dev that contain the associated headers and statically-linked archives. You can find the dev package names by searching using apt-cache search foo, where foo is the base name of the library package you're interested in.