I want to compile QT 5.0.1 in Windows 7 x64, but when I configure qt, that I get:
Qt is now configured for building. Just run nmake.
To reconfigure, run nmake confclean and configure.
d:/Libraries/Qt/5.0.1/qtbase/bin/qmake d:/Libraries/Qt/5.0.1/qtsdk.pro
Project MESSAGE: WebKit: Qt was built without ICU support, WebKit disabled.
I compiled ICU 50 in my machine and there are tests for icu, x32 Release and Debug mode failed them, but x64 are fine. I wrote to system variables ICU/bin and ICU/bin64.
So, please tell how to compile Qt with ICU and WebKit.
The below is an example build configuration:
configure \
-prefix C:\Qt\Qt5.0.1 -platform win32-msvc2012 -opensource -c++11 \
-make tools -make libs -qt-sql-sqlite -no-openssl \
-icu \
-I D:\Projects\icu4c-51_1\icu\include \
-L D:\Projects\icu4c-51_1\icu\lib64
To include Webkit, you must enable -icu and add its include and library path to the command options.
The ICU build type must be the same as Qt, that is, x86 or x64.
Related
I downloaded Codeblocks bundled with GCC from here
The C part is running fine
I read this wiki tutorial which says having GCC will allow me to compile objective C by just adding -lobjc to the compiler options
However, I have followed the steps mentioned in this tutorial and added the -lobjc option, but it doesn't compile
This is the build error message I get in codeblocks:
-------------- Build: Debug in test_prog_proj (compiler: GNU GCC Obj-C Compiler)---------------
mingw32-gcc.exe -Wall -g -c D:\backup\cb_files\objc_files\test_prog_proj\test_prog.m -o obj\Debug\test_prog.o
mingw32-gcc.exe: error: CreateProcess: No such file or directory
Process terminated with status 1 (0 minute(s), 2 second(s))
1 error(s), 0 warning(s) (0 minute(s), 2 second(s))
As shown above, it does not show the -lobjc option
I have also tried manually compiling the above program in Windows cmd by going into the folder containing the .m file. I gave the following command:
mingw32-gcc.exe -Wall -g -c D:\backup\cb_files\objc_files\test_prog_proj\test_prog.m -o obj\Debug\test_prog.o -lobjc
But I get the same error in cmd
mingw32-gcc.exe: error: CreateProcess: No such file or directory
I also tried
gcc -g -fgnu-runtime -O -c some_class.m
that I got from here, but it gives me the same CreateProcess error. How do I start compiling Objective C code in Windows (preferably using GCC and Codeblocks) ?
--- EDIT 1 ---
I did as suggested in Mike Kinghan's answer below, and uninstalled my older Codeblocks instgallation, then reinstalled MinGW and codeblocks separately. The Codeblocks uninstall removed the Codeblocks folder in Program Files, but when I reinstalled Codeblocks again (version without MinGW bundled together), the "GNU GCC Obj-C" settings I made with the previous installation was still there, along with the -lobjc flag in the "linker settings" tab.
However, the problem is that it's still not working. I get the following error if I try to build from Codeblocks
Goto "Settings->Compiler...->Global compiler settings->GNU GCC Obj-C Compiler->Toolchain executables" and fix the compiler's setup.
Tried to run compiler executable 'C:\Program Files\CodeBlocks\MinGW/bin/mingw32-gcc.exe', but failed!
Skipping... Nothing to be done (all items are up-to-date).
This is what Toolchains executable looks like:
If I try to compile it from cmd by going in to the folder with the .m file and issuing the command
mingw32-gcc.exe -Wall -g -c D:\backup\cb_files\objc_files\test_prog_proj\test_prog.m -o obj\Debug\test_prog.o -lobjc
it gives the error
mingw32-gcc.exe: error: CreateProcess: No such file or directory
What is the problem here?
--- EDIT 2 ---
Following the suggestion in Mike Kinghan's answer I deleted the old instance of "GNU GCC Obj-C Compiler" in the list of compiliers, and recreated with the current version of "GNU GCC Compiler"
However, the program still does not work. This is the message I get in the build log:
-------------- Build: Debug in test_prog_proj (compiler: GNU GCC Obj-C Compiler)---------------
Linking stage skipped (build target has no object files to link)
Nothing to be done (all items are up-to-date).
Cleaning the project and then building it again gives the same message. Trying to run the project anyway gives me a dialog box saying the project is not built, and clicking on Yes to build the project just pops the same "project not built yet" dialog box up again. The file icons in the Workspace tree of the Projects tab also seem to be grayed out:
This is what Toolchain Executable looks like:
I have added -lobjc in Linker Settings as mentioned here as well.
I right clicked the project icon in the Project tree, went to Build Options and added -lobjc in the Linker Settings as well:
What is the problem with this project at the moment?
--- EDIT 3 ---
I ended up completely uninstalling Codeblocks (uninstall from windows start menu, delete codeblocks folder in %APPDATA%), uninstalling MinGW (deleting the c:\MinGW folder) and reinstalling everything from scratch. I followed all the instructions in the Wiki (except the Troubleshooting section, but I think that part is irrelevant) and it still doesn't work (same problem as described in Edit 2 in this post).
How do I get Codeblocks to detect and compile obj-C code? Also, it is not showing me the compiler command line arguments when I try to build it from the Codeblocks interface. Why is this and how can I get it to show me whatever the full command line it is using?
The GCC program we loosely call the "the compiler" - [mingw32-](gcc|g++) -
is actually a compiler/linker frontend that invokes a real language
compiler and/or linker depending on what the input files and commandline options
indicate you want it to do.
Input files with an .m extension indicate they are Objective C source files
that are to be compiled with the GNU Objective C compiler, cc1obj. But you
haven't got it. Hence the failure you see.
A GCC installation will include the C compiler cc1 and, optionally, compilers
for other languages - C++, Fortran, Objective (C|C++), Go ... You say you got your MinGW GCC installation as
bundled with Code::Blocks. That bundled MinGW omits the Objective C compiler, cc1obj , because the maintainers
reckon it a niche language.
Best remove your CB installation and bundled MinGW and then install MinGW GCC independently from
one of the rival projects:-
https://sourceforge.net/projects/mingw-w64/
https://sourceforge.net/projects/mingw/
Run the installer and ensure that you get Objective C as well as any other compilers you
want.
After that, replace your CB installation it with the codeblocks-17.12-setup.exe installer (not codeblocks-17.12mingw-setup.exe),
from https://sourceforge.net/projects/codeblocks/files/Binaries/17.12/Windows/. This installer includes no compilers and
will auto-detect your MinGW installation.
Then proceed as you already did to create a GNU GCC Obj-C compiler setup in the CB IDE.
Later ... still not working
Your GNU GCC Obj-C compiler-setup has persisted from your previous
CB install and has been rendered out-of-date by the fact that your
new MinGW installation is no longer part of Code::Blocks. As you see,
it still looks for the toolchain executables in C:\Program Files\Codeblocks\MinGW,
whereas your new MinGW is somewhere else.
When you reinstalled Code::Blocks you should have seen its attempt to auto-detect compilers,
and that it detected your MinGW toolchain in (say) C:\MinGW. It will have configured
a compiler setup for GNU GCC Compiler on that basis, with the correct path to
the toolchain executables. But it will not have modified any persisting compiler setups that
you created yourself, such as GNU GCC Obj-C.
First check that the auto-detected setup GNU GCC Compiler is good just
by creating a "Hello world" C console project and seeing that you can build it.
I assume you'll be able to, but if not, then go into the GNU GCC Compiler setup
yourself and manually set the Compiler's installation directory correctly.
Then, set the same Compiler's installation directory for your GNU GCC Obj-C
compiler setup.
I tried the C example in the documentation, but I can't make it work. I am not sure what files do I need in the include and lib directories and how to set the FLITEDIR variable because I am using Windows 8.1 and VS2015. In example:
gcc -Wall -g -o flite_test flite_test.c -I$FLITEDIR/include -L$FLITEDIR/lib -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex -lflite -lm
I tried
gcc -Wall -g -o flite_test flite_test.c -IE:\flite\include -LE:\flite\lib -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex -lflite -lm
I built the flite vcxproj for Release and I got an fliteDll.pdb file and some cmu.obj files. I also buit the project for Debug and I got a flite.lib and cst.obj files. I am a beginner programmer. Can you tell me what to do?
gcc is for Linux, you simply need to follow Windows build process:
Create a VS2015 project
Add C code flite_test.c into it
In project properties add include path to flite libraries
In project properties in linker configure linking to flite.lib
Compile VS2015 project and run
For more details see the walkthrough on creating and using DLL libraries in Visual Studio
I used to build arm64-v8a lib of api level 19 use android.toolchain.cmake comes with Android NDK r16b like this.
${CMAKE} \
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
-DANDROID_NDK=$ANDROID_NDK_HOME \
-DANDROID_ABI="arm64-v8a" \
-DANDROID_NATIVE_API_LEVEL="android-19" \
-DANDROID_STL="c++_shared" \
-DANDROID_CPP_FEATURES="rtti exceptions" \
..
Now i want to pack my lib use conan which cross compile android lib use standalone toolchain. Its seems to be impossible to make standalone toolchain with --arch arm64 and --api 19, since the following command
./make_standalone_toolchain.py --arch=arm64 --api=19 --stl=libc++ --install-dir=./test
will fail with error message:
19 is less than minimum platform for arm64 (21)
is there any way to fix this?
Because there's no such thing as API 19 ARM64. 64-bit support was added in android-21.
CMake supports this because our toolchain file was modeled off of a popular option that was commonly used at the time and that's what it did. ndk-build does it because you build multiple ABIs in a single invocation. In both cases, the build automatically pulls the API level up to 21 for 64-bit targets.
Standalone toolchains are for exactly one architecture, so they give an error if you specify an API level that is not supported by that architecture since it was likely a mistake.
I'm trying to build some software from ECMWF called ECCODES.
It builds fine on GNU/Linux.
It builds fine on Mac OS X.
It builds fine on Windows/Cygwin.
Unfortunately (Ugh!!), I must use Windows and I can't use Cygwin.
I have to use something like MinGW.
The build instructions use CMake. I am no expert at CMake. The Windows system I am on has:
cygwin64
mingw64
a bare-bones Visual Studio 14
I've tried every incantation and override of the CMake variables/options:
-DCMAKE_C_COMPILER=... \
-DCMAKE_CXX_COMPILER=... \
-DCMAKE_Fortran_COMPILER=... \
-DCMAKE_MAKE_PROGRAM=... \
-G ...
to get ECCODES to build using MinGW, with no luck. I know some will ask, "Why not contact ECMWF?" The short answer is, the response time is very long (months/years). The FAQ page is empty, and you can't post questions on their Jira site (it's locked).
Would it be possible for someone who knows CMake and MinGW well to download the .tar.gz, build ECCODES using MinGW, and tell us how you did it?
http://www.ecmwf.int/
https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home
https://software.ecmwf.int/wiki/download/attachments/45757960/eccodes-0.13.0-Source.tar.gz?api=v2
Eclipse June CDT reports g++ not found in path, how to fix this?
Typically, g++ will be installed when gcc (GNU Compiler Collection) is installed.
First confirm that you have g++ installed.
You can check this by typing the following in a terminal: which g++.
The response ought to be /usr/bin/g++.
If you find g++ installed, in eclipse go to project->properties->C/C++ Build->Discovery Options, under tools GCC C++ Compiler, put the exact path to g++ instead of g++ (if g++ alone does not work).
You will find this link useful:
What is the difference between g++ and gcc?
If you still have problems, do get back with feedback.
I had similar problem and it is solved by
Installing g++ The GNU C++ complier using ubuntu software centre and
Changing in -
Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT GCC Build in Complier Settings [Shared]
From: ${COMMAND} -E -P -v -dD "${INPUTS}"
To: /usr/bin/${COMMAND} -E -P -v -dD "${INPUTS}"
I hope it helps. I think if you add it to the project as mentioned in the first answer, you will need to add all the time for new projects. And if you add as I wrote you don't need to add it for new projects.
I have exactly the same problem. I never had problems with eclipse before under linux and now it wont even compile code. I tried to change the name of the g++ and gcc compilers to their exact location in project->properties->c/c++ Build->discovery options etc. nothing helped, I tried to reinstall eclipse and did an initialize, added the path to the variables etc.. Nothing worked so fare. The project I am working on is quiet big and I rather would like eclipse to manage the source and makefile, instead of doing it manually
Linux Mint 15 Eclispe: Version: 3.8.1 (I tried it with the latest version as well ... nothing changed)
g++ --version g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gcc --version gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
example:
#include // not resolved using namespace std;
int main() {
std::cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
return 0;
}
Well the code above is not what bothers me, as I can fix it by adding the includes of the exact c++ include path, but the code just wont compile. Wired enough eclipse gives me the error:
Description Resource Path Location Type Program "g++" not found in PATH Preferences, C++/Build/Settings/Discovery, [CDT GCC Builtin Compiler Settings] options C/C++ Scanner Discovery Problem
but it appears to me to be possible to compile single files, by opening them and pressing crt+b, but the whole project wont compile.
Fixed the problem this morning:
- got the latest eclipse
- created a new workspace
- created a new project
after a few seconds the very same error disappears
This issue was fixed for me once I deleted eclipse's .metedata folder, called eclipse -initialize from the command line and started eclipse again. HTH
Creating a new Workspace directory on Eclipse startup solved the problem for me.