After hours i was finally able to compile the wxwidgets-2.8.12 library as follows:-
I unzipped the .zip into a folder D:\wxwidgets2812\wxwidgets-2.8.12
I went in D:\MinGW\MSYS\1.0 run the batch file and did the following:-
Went to the following path:-
cd /d/{WXWIN}/build/msw
and compiled the library in the following way as :-
mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=1 UNICODE=0 BUILD=release
It Build /Compiled succesfully Then I added in the project properties ->include directories ->D:\wxwidgets2812\wxwidgets-2.8.12\include ,addidtional options->wx-config --cxxflags,in linker i added in libraries->wx-config --libs
Now when i run my code / project ,it gives me following errors:-
The application failed with exit code -1073741515 (0xc0000135).
This could indicate that no required .dll was found in the PATH.
Please try to start the following command from the command shell (cmd.exe).
This may give some additional information.
C:\Users\Lenovo\Documents\NetBeansProjects\CppApplication_6\dist\Debug\MinGW_1-
Windows\cppapplication_6
RUN FAILED (exit value -1,073,741,515, total time: 22ms)
Please help me running the application.
Thanks
" This could indicate that no required .dll was found in the PATH"
This suggests that you have built your application to link to a DLL containing the wxWidgets library.
You can go two ways from here:
Change your application build to link statically to the library. You will also have to build wxWidgets to generate a static library if you have not already done so.
Copy the wxWidgets DLL into your path. ( Or add the DLL folder to your path as a quick fix to get you started. )
Option #2 is probably simpler for now, since you seem to have built the DLL version of wxWidgets. So, you need to find the wxWidgets DLL that was created when you built wxWidgets and move it into your path.
Related
I wonder if anyone can help me..
I'm having a problem trying to build 'Freechart' charting widget, downloadable from here:
https://sourceforge.net/projects/wxcode/files/Components/wxFreeChart/
Project: 'freechart-1.6.zip'
I'm using widgets 3.1.1 with a GCC compiler. I've built it with WX_SHARED=1, using the following build command:
mingw32-make -f makefile.gcc WX_DIR=C:\wxWidgets-3.1.1 WX_SHARED=1 WX_UNICODE=1 WX_MONOLITHIC=1 WX_DEBUG=1 WX_VERSION=31
It builds and the following .a and .dll files are generated in the lib/gcc_dll folder:
libwxcode_msw31ud_freechart.a
libwxcode_msw31ud_freechart.dll
However, when I try to build it with SHARED=0, using:
mingw32-make -f makefile.gcc WX_DIR=C:\wxWidgets-3.1.1 WX_SHARED=0 WX_UNICODE=1 WX_MONOLITHIC=1 WX_DEBUG=1 WX_VERSION=31
It throws the error:
C:/Program Files (x86)/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31ud
The file exists in the widgets 3.1.1 lib directory, here:
C:\wxWidgets-3.1.1\lib\gcc_dll
There isn't an actual project file for freechart that can be opened in codeblocks, So, the widgets libwxmsw31ud.a file can't be set in the Project/Build options/Linker settings. Freechart is built in the command prompt. I'm not sure how to tell the compiler where to find this file.
As I said, the build works with SHARED=1. Any input would be much appreciated.
Paul
It looks like you did not build wxWidgets as a static library required by your build options due to the use of WX_SHARED=0, as you should have the outputs of this build in gcc_lib subdirectory and not the gcc_dll one. You need to either make sure that you build wxWidgets itself as static libraries (using SHARED=0 when building it) or use WX_SHARED=1 if you're fine with using wx DLLs.
BTW, there is absolutely no reason to use 4-year old wx 3.1.1, please use the much more recent 3.1.6.
I would like to create a CMake project using cmake -i interactive mode, but came across the error:
cmake: error while loading shared libraries: libidn2.so.0: cannot open shared object file: No such file or directory
I've been following the tutorial https://learnopengl.com/, but use Manjaro Linux instead of Windows, so wanted to use the command line as explained in https://cmake.org/runningcmake/
On research, most examples suggested adding to the LD_LIBRARY_PATH. I attempted this, locating libidn2.so at /usr/lib and adding it to the relevant path. It had no affect whatsoever however.
Next I attempted uninstalling CMake in the package manager, and curiously the command still gave the same error message, even though given it was uninstalled, CMake should not be recognized as a command at all.
I have had problems with CMake on my machine in the past, having been unable to install and link the CGAL library using CMake, so it may be a symptom of a wider issue.
I found a solution to the problem after using which cmake. Turns out there was another set of the cmake commands that came with the operating system I found in /usr/local/bin/cmake.
It was solved by deleting the command files in this location, so the command files of the actual installation were run instead, which functioned correctly.
I am using the ITPP library (IT++ library) for one of my projects. For using the eigen_sym() function of this library, it asks for installing the LAPACK. I tried the direct prebuilt libraries for Windows but still get the error. Finally on the following site:
http://icl.cs.utk.edu/lapack-for-windows/lapack/#libraries
I found a solution under "Build Instructions to create LAPACK and LAPACKE 3.5.0 dlls for Windows with MinGW" that might work. I did steps 1 to 5 but got stuck 6 onwards.
My destination of the cmake build is E:/LAPACK
I got an error while in the cmd prompt while entering:
cd E:/LAPACK 3.5.0 >Enter
C:/MinGW/bin/mingw32-make.exe >Enter
i'm getting
mingw32-make.exe> No targets specified and no make file found. Stop.
Can someone explain the step 6 onwards in detail and tell me where i'm going wrong?
I finally want to get the .dll and .lib files.
I was able to build LAPACK 3.5 for windows using mingw and pretty much the build guide from the LAPACK page. Using the following steps
Download lapack.tgz from here http://netlib.org/lapack/lapack.tgz
Extract to a folder. I used 7zip file manager to extract the tarball to x:/Other/test
Install mingw32. I used this: http://www.mingw.org/download/installer and I selected and installed mingw32-developer-toolkit + mingw32-base + mingw32-gfortran + mingw32-gcc-g++ + msys-base
Open a command prompt
Append mingw to your path
path=C:/Mingw/bin;%PATH%
change directory to the location you extracted lapack: For me this was X:\Other\Test\lapack-3.5.0 so the command I typed was the following (your path will be different):
C:\Users\jdrescher>x:
X:>cd Other\Test\lapack-3.5.0
X:\Other\Test\lapack-3.5.0>
make a folder for your build. I used build
X:\Other\Test\lapack-3.5.0>mkdir build
then change directory to the build folder
X:\Other\Test\lapack-3.5.0>cd build
X:\Other\Test\lapack-3.5.0\build>
Now configure with CMake
X:\Other\Test\lapack-3.5.0\build>cmake -G "MinGW Makefiles" -D BUILD_SHARED_LIBS=ON -D CMAKE_GNUtoMS=ON ..
Now use gnu make to build LAPACK
X:\Other\Test\lapack-3.5.0\build>c:\MinGW\bin\mingw32-make.exe
Note: This step will take several minutes.
After the above steps completed 100% with no errors, I have the following dlls in the build\bin folder: libblas.dll, liblapack.dll, libtmglib.dll
Also the following libraries, and exp files in the build\lib folder: libblas.exp, libblas.lib, liblapack.exp, liblapack.lib, libtmglib.exp and libtmglib.lib.
C++-Protobuf does not compile in VS2012. Now I want to use MinGW to compile it on windows. Can someone please give me some brief headwords on how to compile protobuf on Win7 x64. I already installed MinGW with the GUI installer. Google writes as MinGW setup notice that I should refer to the Unix installation notes. But I cant figure out how to use the auto tools on windows.
Edit
Okay this is what I've done until now:
$ mount C:/ WinDir
$ cd ./[...]/protobuf.2.4.1
$ ./configure
$ minGW32-make.exe
$ minGW32-make.exe check
minGW32-make.exe runs without errors, but no tests are running and I cant find libprotobuf.lib. There are some libprotobuf.dll but I need the lib, dont I?.
You should have an MSys console together with your MinGW instalation. This console provides an linux-like environment in which you should be able to use autotools normally.
If MSys is not installed, you can grab it from the MinGW site too.
cd to your directory with sources and try the usual:
$ ./configure
$ make
Some libraries cause problems on Windows but most compile well with MinGW and MSys. Come back and add more info to your question if you run into specific problems.
Edit:
minGW32-make.exe runs without errors, but no tests are running and I cant find libprotobuf.lib. There are some libprotobuf.dll but I need the lib, dont I?.
Usually for a dynamic library you'd get protobuf.dll (the dynamic library) and libprotobuf.a (the static wrapper library).
When linking, just pass -lprotobuf to the linker - it will look for both libprotobuf.a and protobuf.lib.
(.lib is another static library format, which is partially handled by MinGW but not native here.)
You will not work with a .lib file when using the MinGW toolchain. Instead, you are able to link against the dll directly. The MinGW Wiki explains this.
I could get dll and lib both. This is when you do not want static lib file and want to use dll and lib file.
You need to make following changes in Protobuf code:
Open the project in VS. Or any other editor. I use VS2015.
In libProtoBuf project settings, in C/C++ Preprocessor add following flags.
PROTOBUF_USE_DLLS; LIBPROTOBUF_EXPORTS;
Those flags will export information from profobuf using dllexport
in ur client code where you are using Protobuf, define: PROTOBUF_USE_DLLS. Which will make protobuf includes to use dllimport.
Once you do step 2, you will see both dll and lib in your output folder. Otherwise, you will always see just dll and not lib file.
Hope this helps. If not, please write a message here and I can help you getting this sorted out.
I've been searching on the internet for some useful and clear information about this, it's annoying that such a trivial thing is so hard to do.
What I need is to create an executable file for my Qt project, in order to run it in other computers. My project runs nicely in the Qt Creator, but when I try to run the executable created in the release folder I get errors about some dll missing, and though I have put all of them in the same directory of my .exe I now got some errors about entrypoints in procedures inside the dll (QtCore4.dll).
The solution looks like to be a static linking, I've found many information about it, but none of them really helped me. Here is what I have tried so far:
Using the executable created in the release folder as I said above.
Static Linking, following this tutorial (and many others, all almost the same thing): http://doc.qt.io/qt-4.8/deployment-windows.html but I get the following error during the "configure -static": NMAKE : fatal error U1077: '"c:\Arquivos de programas\Microsoft Visual Studio 9.
0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
Building qmake failed, return code 2
For that I couldn't find any solution, so here I am, just trying to create an executable file for my Qt project, hope you guys can give me some light here.
Basically you have to look for mingw subfolder deep into qt tree, where qt utilities reside, and copy needed dll's.
These are the steps I follow, based upon QT 4.7.4, for packaging the application with correct shared libraries.
Let's say you've installed QT under c:\qtsdk
Open your project, and compile it in release mode.
Go to this directory: C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin -- it contains all shared libraries. Debug libraries end with a "d" -- frex, QtCore.dll is release version, while QtCoreD.dll is debug version
Copy at least these files into your release directory (where your .exe lies)
mingwm10.dll
libgcc_s_dw2-1.dll
QtCore4.dll
QtGui4.dll
I just built, tested and deployed a dummy project this way.
Do these steps:
1- Open qt command-line window.
2- Go to the directory which .exe file exists (using cd command).
3- Run windeployqt.exe --quick . command
4- Run your exe file and enjoy it!
This video is great
Here is what I did and I got it to work after some time;after making sure that your program builds inside Qtcreator,go to the directory that contains your exe and double click on it.(I'm using windows and don't know if it is the same on other platforms).A window should popup telling you which .dll is missing.Go to the directory where Qt is installed and type the exact name in the search bar(top-right in Windows 7) and the dll should show up in search results.Right click and choose open file location.Copy the file where your exe is located .Double click on the exe again.If another .dll is missing repeat the same thing until none is missing.In the end your program should run.
Hope this helps.
So you downloaded Qt SDK and you want to link Qt libraries statically into you application, right?
First of all, if you link statically, you don't need any Qt*.dll to be present anywhere because it is built into the application. So that alone means that your application is built using dynamic linking.
From my experience, that safest way to get it all working is:
Download Qt sources, build and install them with nmake ( using Visual Studio Command Prompt from Menu Start -> Application -> Visual Studio 2008 ). Just remember that the size of the statically linked application is dependent on the size of the *.libs and these are dependent on the pre-build configuration, for example, you can minimize the size of you application by turning off some features ( this is an example config for MacOSX, just watch out for the ones specific for Windows and add proper plaftorm - see configure.exe --help for details ):
./configure -arch x86 -platform macx-g++ --universal -cocoa -debug-and-release -opensource -static -fast -no-accessibility -no-sql-sqlite -no-qt3support -no-opengl -no-openvg -qt-zlib -no-gif -no-libmng -qt-libmng -no-libtiff -qt-libjpeg -no-3dnow -sse -no-sse2 -no-openssl -no-dbus -no-phonon -no-multimedia -no-audio-backend -webkit -no-script -no-scripttools -no-declarative -nomake demos -nomake examples -no-exceptions -no-accessibility -confirm-license
Install, setup and use Visual Studio Add-In for you Qt project (here ).
Good Luck! :)
I share with you my solution. On my qt creator 4.2.1, I did these steps:
1) - I clicked on release and it generated a folder in my project directory like that: C:\Users\Samir\Documents\Qt-Projects\build-Calculator-Desktop_Qt_5_8_0_MinGW_32bit-Release.
2) - I opened the terminal qt 5.8 for desktop and I navigated to my project directory where the .exe located.
3) - Finally, I ran the command line windeployqt.exe --quick .. This command allowed me to generate the libraries which were missing.
And now everything works fine!