Can't "make" lib-tins on Ubuntu 16 - built-in

I've downloaded the tins tar.gz file, proceeded to Cmake with c++ flags but couldn't accomplish "make".
Any suggestions?

Problem solved: I've downloaded the tar.gz to wrong path.
Fix: copy tar.gz to /home or etc.

Related

Linking my CMAKE project with libpng in Windows

I'm working on a C++ project that requires libpng. So far I've worked on Linux and everything is smooth. I installed libpng, CMAKE picks it up and everything is alright. Now move to Windows.
Here I first installed zlib (required by libpng) and libpng. When I say install, I mean I downloaded the source files, and then built them and install them using msbuild.
I noticed that by doing so, I got new folders under c:\program files (x86):
c:\program files (x86)\zlib
c:\program files (x86)\libpng
Seemed all right to me. Now when I configure my project with CMAKE zlib is picked up:
-- Found ZLIB: C:/Program Files (x86)/zlib/lib/zlib.lib (found version "1.2.13")
but there's no way CMAKE finds the PNG library:
Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
Now I tried to have a look at the FindPNG and I noticed this line:
find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES include/libpng)
Does this mean that CMAKE expects the file png.h to be in a directory ending in include/libpng? If so, then it will never find it because in my case png.h is placed in libpng/include. But this is also the "official" installation from the source code just downloaded from http://www.libpng.org/pub/png/libpng.html.
So now I am superconfused. How things are supposed to work in Windows? Should I "create" a folder structure with the correct files for every library so that CMAKE is happy? In a way I hoped things in Windows were similar to what happens in Linux: libraries go in a standard folder, they are detected by CMAKE.. everything is ok. But apparently this is not the case. So my question in general is: how do you ship a package like this to a Windows user so that he can builds it without having to go through all this?
Thanks so much
Fabrizio
This would be the right one to use:
find_package(PNG)
You can tell CMake to look in the location where you installed it by adding the libpng base install location to CMAKE_PREFIX_PATH. Without this, CMake doesn't know where you put it.
cmake "-DCMAKE_PREFIX_PATH=C:/Program Files (x86)/libpng" ...
Note that FindPNG first looks for zlib and will fail if zlib could not be found.

mingw-w64 installer "the file has been downloaded incorrectly"

I am trying to install mingw-w64 onto Windows. However I receive an error, "the file has been downloaded incorrectly". Redownloading the setup file again from sourceforge does not fix the problem. Is there an alternative way to install it or am I doing something wrong?
Old post but same problem, the installer doesn't seem to work.
I give the solution which works for me
You can directly download the archive of MinGW64 with your chosen configuration :
https://sourceforge.net/projects/mingw-w64/files/mingw-w64/
Once the compressed file downloaded, you have just to extract and copy/paste the MinGW64 folder( with the pre-compiled librairies) to your chosen folder ( in my case : C:\mingw64)
I got same error and solved it, after struggling a few hours. You should download MinGW64 via https://winlibs.com/#download-release.
After downloading, You should unzip mingw64 file to a folder(in my case I unzipped it to c disk; C:\mingw64)
And then you have to set up path. for that follow below steps;
open settings.
Search for Edit environment variables for your
account.
choose path variable and then select edit.
Select New and add the Mingw-w64 folder path(bin folder). In my case, I added (C:\mingw64\bin).
Select OK to save the updated path.
And reopen your cmd, then check if everything is good by typing; gcc --version
Long story short, the official installer is broken and not been fixed for years, so we have to install it manually.
The official download link above would bring you to sourceforge: https://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/installer/mingw-w64-install.exe
And in the same folder that contains the installer, there's a repository.txt. (about this file)
Take a look at it, the installer basically just download and unzip the build from one of these urls within repository.txt. Choose the url you want and download/upzip it manually. (In my case, I use 8.1.0|x86_64|posix|seh|rev0 setup)
Last, setup the Path environment variable pointing to your unzipped bin folder, let say C:\mingw64\bin, and this should do the trick.
Finally, I solved this problem by downloading this:http://winlibs.com/
GCC 10.1.0 + LLVM/Clang/LLD/LLDB 10.0.0 + MinGW-w64 7.0.0 - release 3 (LATEST)
Win32: 7-Zip archive* | Zip archive
Win64: 7-Zip archive* | Zip archive
and set the %path%
After that, I still can't execute gcc correctly, but then I solved the problem by adding this environment variable:
"CGO_ENABLED=1"
I encountered the problem when using this golang package: https://github.com/mattn/go-sqlite3
I received the same error. When I re-ran the installer as an adminstrator it was installed successfully.
I also made sure not to add any spaces to the installation path.
Following this tutorial helped me manually install MinGW for windows : youtube
So the problem for me was that when I tried to use the .exe installer, it either showed me that,
"the file has been downloaded incorrectly" , or , the /.../bin folder did not have any files in it.
In the link above, the MinGW files (including the /bin files) were manually downloaded and identified properly by the Environment Variables.
The problem is with your internet connection and/or ISP. I'm not great at networking so I'll let others be more specific. I tried installing/downloading it using my mobile's data as wifi hotspot and it worked. Hope it helps

How can I install freeGlut for windows on Codeblocks 12.11?

I have never installed new libraries in Codeblocks before and would like to know how to do it, Thank you!
At first download the freeglut from here. Don't download the source download the binaries. Unzip the zip file then you will see the include directories ,lib directories and greeglut.dll file.
After you download and open the GLUT bin zip file, you will need to:
Copy freeglut32.dll to c:\windows\system,
Copy freeglut32.lib to c:\program files\mingw\lib, and
Copy freeglut.h to c:\program files\mingw\include\GL.
All steps I can't explain here So for details please follow this link here or this link here

Autoconf on Windows

I'm currently trying to compile Freeglut on Windows 7 using MinGW. The problem is that there is just a makefile.am and a makefile.in. Thanks to Google, I found out that these belong to autoconf. The problem is that I haven't found a autoconf.exe file, just files for MSYS or Cygwin.
Is there a way to get/compile a exe file? If there is, is it also available for x64 windows?
Actually, Makefile.am is the input to automake, and Makefile.in is a template that is turned into the actual Makefile.
If you install MSYS, then you can unpack the tarball, then run ./configure and then make to build it.
But why would you do this when someone else has made 32- and 64-bit windows binaries already?

How to install omniORB on Windows?

I installed Python and MinGW, added everything which is needed to PATH (g++ and python), and downloaded omniORB from http://sourceforge.net/projects/omniorb/files/omniORB/omniORB-4.1.6/omniORB-4.1.6.tar.bz2/download, unzipped it.
I cded to omniORB directory but there were no omniORB binaries in \bin\x86_win32 directory.
So I have 2 questions:
1) where can I get omniORB binaries? (I would like to install omniORB on my computer with Windows XP/Vista (both x86))
2) is it possible to install omniORB from source when I have only MinGW installed (no Visual C++)? How to do this (I need steps)?
As you have already installed Python, MinGW and added environment settings also,
You need to do the following things.
Go the unzipped folder of OmniORB ( I assume it is there in C:\OmniORB)
Open the src folder, where you can find the make files
Compile it with the MinGW(gcc) compiler which you have installed already
Answer for Question 1:
Once the compilation is done, you will get the OmniORB binary, if it is not found in bin folder.
Answer for Question 2:
Once you unzipped, it internally means you have installed. It doesn't have any setup.exe files externally.
Since you have MinGW make use of gcc compiler in it.

Resources