Using RakNet source with Code::Blocks on Ubuntu - c++

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

Related

Why doesn't curl-config --cflags print libcurl's header files directory?

I'm trying to include libcurl in my c++ project, and so am trying to find where the header files are located, but running "curl-config --cflags" just prints an empty line, instead of any useful information. I do have libcurl installed, not only because curl-config is included in libcurl and doesn't throw an error when calling it, but running "sudo apt-get install libcurl4" tells me it's already installed, and is the latest version.
I've tried googling this problem but haven't found anyone else with the same issue, I've run "sudo apt-get upgrade libcurl4" and "sudo apt-get update" and still get the same issue, and I've run out of ideas. Does anyone know what the problem might be?
My operating system is Linux Mint Cinnamon. Let me know if you need other info. Thanks!
I believe S.M. found the answer, which in hindsight I should have tried. Apparently, my system already had the necessary header files in its default include paths, meaning there would be no path to include, hence the blank line. I probably should have tested this by seeing if my code completion software detected it, I would've saved the headache! :) For the sake of future programmers with this issue, here's the takeaway: test to see if a library is installed already first, THEN try to install it! Thanks S.M. for the help!

gperftools not installing -lprofiler on Mac after installing it with brew

Recently I wanted to profile my cpp code and came across gperftool, but there aren't really clear instructions on how to use it with Mac. So far I have run brew install gperftools and wanted to compile my simple cpp file which just outputs "Hello world!". I run g++ main.cpp -lprofiler -o main but get error ld: library not found for -lprofiler. I really appreciate it if you could guide me or should me a tutorial where it's easy to follow. Thanks :)
Edit: Currently I am using MacOS with new M1 chip (not sure if that can cause any issue)
So brew didn't install the binaries and that's it.
Follow these steps if you are having a hard time making it work
clone https://github.com/gperftools/gperftools
run ./autogen.sh
run ./configure
make && sudo make install
you should see some path where the binaries where installed, if you wanna take a look at it to make sure (mine was /usr/local/lib)
Profit
I found you can also use the -L$(brew --prefix gperftools)/lib flag to tell g++ where to look for the libraries if you don't want to install with make.

Install libsodium on macOS

I am trying to incorporate libsodium into my C++ project in Xcode. I am following the Installation instructions here: https://libsodium.gitbook.io/doc/installation
However, I'm not sure where the "installed" files go on my machine or how to then incorporate them in my Xcode project. The libsodium website is not helpful. Could someone help clarify for me please?
I have downloaded the latest stable release, unzipped it, and typed the following code into the shell:
./configure
make && make check
sudo make install
It seems that the configure, make and install processes go smoothly. I expected the next steps to link to Xcode would be clear, but they are not, and I am lost. Can someone point me in the right direction?
When you perform the sudo make install step, the library files will be installed into the location the ./configure step designated. By default, this is usually /usr/local/lib.
You will still need to add the library files to your XCode project.
Try reading Link a target to libraries and frameworks about how to add the libsodium libraries. Pay attention to the "Add Other..." button which will allow you to navigate to the location you installed the libraries.
Hope this helps!

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

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.

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