How can I build gettext 64bit dll on Windows. - 64-bit

I succeeded to build gettext 32bit dll on Windows.
I installed these.
gettext-0.18.11
mingw (include msys)
./configure --prefix=/mingw --enable-threads=win32 --enable-relocatable
cd gettext-runtime
make
But I don't know how to build 64bit dll.
Someone said I should use mingw64. Then I installed mingw64 and msys.
But I don't know how to do setting mingw64 and msys to build 64bit dll.
And I don't know gettext configure option to build 64bit dll.
Thanks.

Download latest MinGW-w64 targeting 64-bit (there are also targeting 32-bit, so be careful) here.
NOTE: As you added --enable-threads=win32, then probably you would be interested in the distribution with Win32 threading support, rather than POSIX, so be cautious when you choose which one to download.
Configure in almost the same way, but with addition of one option:
./configure --build=x86_64-w64-mingw32 --prefix=/mingw --enable-threads=win32 --enable-relocatable
Lean back. :)

First download gettex from here: https://mlocati.github.io/articles/gettext-iconv-windows.html
then add system var PATH: C:\Program Files\gettext-iconv\bin
afterwards
create in your project a folder that bears the note of
locale/
afterwards
add variable in settings.py: LOCALE_PATHS = (BASE_DIR + 'locale/', )
and
finally try to run
python manage.py makemessages -l fr

Related

How to safely reconfigure gcc on my Linux system?

I am trying to install a program on CentOS 6.10 and at the end of the installation, it gave an error saying that Glibc-2.14 is necessary. I upgraded the current Glibc and this time the error below occurred:
* These critical programs are missing or too old: gcc
* Check the INSTALL file for required versions.
I upgraded the gcc and tried to configure again. However, the same error persists. Hence I read the INSTALL file as it suggests, and I see this section:
You may also need to reconfigure GCC to work with the new library. The
easiest way to do that is to figure out the compiler switches to make
it work again (`-Wl,--dynamic-linker=/lib/ld-linux.so.2' should work
on GNU/Linux systems) and use them to recompile gcc.
So should I go to where gcc is built and do:
$ ./configure -Wl,--dynamic-linker=/lib/ld-linux.so.2 ?? Do I understand the instructions correctly? If so, then how will I be able to configure only gcc and not the other executable files as they are all in the same folder? (e.g gcc-5, git, idle, python, python-build.. etc) The directory is something like: home/linuxbrew/.linuxbrew/bin/gcc
I'm asking this because GNU compiler and GCC are fundamental in Linux system, and I'm not sure if those are the correct steps.
You are probably using a really old compiler (the one that comes with CentOS by default).
You need to install Red Hat Developer Toolset which provides up-to-date versions, see https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ for more details:
Developer Toolset is designed for developers working on CentOS or Red Hat Enterprise Linux platform. It provides current versions of the GNU Compiler Collection, GNU Debugger, and other development, debugging, and performance monitoring tools.

Cross-platform build under Windows targeting Linux using CMake

I am developing a software in C++ on windows 32-bit (using MSVC++), but since I want to be able to use my software on every platform, I have decided to use CMake as my build generator.
Therefore, I am still just a beginner in CMake. From the CMake tutorials, I understand that in order to cross compile codes, first a toolchain simulating the target platform should be installed on the host platform. Then using the appropriate target-platform C and C++ compilers provided by this toolchain, CMake would be able to generate makefiles etc.
Now, I want to build my code for Linux platform(GNU/Linux) on a Win32 platform. I tried doing the above procedure using CMake combined with Cygwin and using gcc and g++ as compilers. It built fine, created makefiles, and when I issued "make" in Cygwin terminal, the generated makefiles were "made". Now I have got an executable which I was hoping would run on Linux platform. But on Linux I get the error: bash cannot execute binary file.
Using command file executablename, I realized the executable which is made by the above procedure is of type PE32 which is only for Windows.
Now my question is: Is my understanding of cross-platform build procedure using cmake correct?Or should I just use another Linux toolchain under windows to get a Linux ELF executable? What toolchains come to your mind which would give me what I want?
Many thanks
Setareh
You will want to look here: cmake-toolchains(7) if you do cross compiling. However, I would suggest that you install a Linux VM like virtual box on your windows machine and build naively on Linux. It will compile much faster and you will not have to worry about cross compiling. You can mount the windows disk from the linux VM so you can share the same source tree. The linux VM will compile much faster than gcc running under windows.
Your understanding of CMake is correct... it will determine how to create the build system you request (or is default for the platform you are currently on) based on rules in your CMakeLists.txt file. However, this won't necessarily help you compile for linux on a windows machine if you don't have something installed that can target linux.
To compile targeting linux, you will need to use a linux compiler. The link posted by #stjin tells you how to install one on cygwin. Then, to set up your CMake build, do this in the terminal:
CC=gcc-linux CXX=g++-linux cmake . [options]
This will tell CMake to locate the special linux targeted compilers. Hopefuly, after compiling with these compilers you will be able to run on linux.

linux, freepascal, fp-ide: No debugger support availble. How to enable debugger?

How to enable debugger in fp-ide? I read somewhere that I should compile fp-ide from sources, but I don't know how to do this. Can someone help me?
Get the generic linux tar installer (fpc-2.6.0.x86_64-linux.tar) for FPC from http://www.freepascal.org/down/x86_64/linux-hungary.var It comes with a precompiled IDE with integrated debugger support and it works fine at least on 12.04 LTS.
I wasn't able to find a PPA for fp-ide, but I can describe how the CLI IDE is compiled on Arch Linux as documented in the repository. Do note that compiling will not enable the debugger in the CLI, as it seems to be an incompatibility between gdb and fp (fp-ide) according to e.g. this bug report in Debian. On Arch Linux, the fpc package also doesn't support the debugger in fp by design (it is explicitly disabled using the NOGDB flag).
Anyhow, here goes the compilation process:
Make sure you have FreePascal installed already, as you need it to compile the IDE
Download the source tarball
Extract the tarball to a location of your convenience and cd into that directory
Execute the following code from within your shell:
pushd fpcsrc/compiler
fpcmake -Tall
popd
make build
make -j1 install
# in Arch, the switch "NOGDB=1" is present in both make lines
That should compile the IDE and install it (you can even try to integrate it in dpkg by using checkinstall instead of make install, but take a look at the Arch PKGBUILD to see an example of what might be needed).
But why do you use the command line IDE fp instead of lazarus? With lazarus you can also make console applications and it offers much more features (e.g. working debug support).

Building GSL (GNU Scientific Library) in Windows for use with VS2005

I'm trying to get GSL working in a windows environment for my team and I'm running into many problems.
My team develops in C++ in VS2005, and we'd like to use GSL. I've downloaded the GSL-1.15 tar.gz, and unzipped it, but i'm not really sure what to do from here - I believe only two compilers will build it properly.
On the GNU website, it says that a compiled version of GSL is available as part of Cygwin on windows, so I installed Cygwin, but again, I'm not really sure what to do from there.
Ideally, what I'm trying to get is a folder on my C:\ with a bunch of dll / libs that I can link to in VS2005 to use the GSL functions. I'm aware of GSL ports to VS (http://gladman.plushost.co.uk/oldsite/computing/gnu_scientific_library.php), but we can't rely on them as I would be dependent on the publisher releasing a port every time a new version of GSL is released.
Has anyone successfully gone through this process of building GSL and getting it to work with C++ in VS2005? I've done some google searches and haven't found anything that I understand.
Thank you.
With Cygwin
Install one or more of the GSL packages
gsl
gsl-apps
gsl-devel
gsl-doc
With MinGW
I have personally built GSL with MinGW using this incantation
wget ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz
tar xf gsl*
cd gsl*
./configure
# Warning, make takes about 7 min.
make
make install
ref

How can I cross compile my Linux application to get a Windows executable in Linux?

I need to cross compile my QT application in Linux. I compiled my application from the QT SDK in Linux and it is working properly.
How do I create an .exe for the same application in Linux. I have installed Mingw in Linux and qmake, but I dont know how to proceed with cross compiling.
How do I link my QT with a cross compiler like MinGW and Qmake. I am using SuSE Linux. I have also gone through http://Silmore/29 but I am not getting a clear picture of how to proceed futher.
I'm not familiar with SuSE, but Ubuntu has the mingw32 packages which is a windows targetted cross compiler, along with the open source win32api:
(source: liranuna.com)
After a small search, turns out there are RPMs for it here, while it should probably be in your repositories.
Basically, you use your cross-toolchain for the Make process rather than the host toolchain. I assume there is no autotools configure script. If there is you can run configure with --host specified and have it all figured out for you.
So what you'll need to do is set CC, LD, CFLAGs, LDFLAGS (probably also CXX and CXXFLAGS) and modify the Makefile to use the right QT libraries - which will need to be mingw, not your Linux libraries. So you may also need to obtain the MinGW/Windows QT SDK and store it separately so your paths cam be specified properly.
Hope this helps!
You could run the Visual C++ Express Edition 2008 cl.exe through wine to compile your project.

Resources