Unable make wxWidgets-3.0.4 on codeblocks - c++

I am facing a problem when I try to install the wxWidgets-3.0.4 and used it with Code::Blocks. I have searched a lot on the internet for something similar, without success.
I had installed the wxWidgets in the directory C:\wxWidgets-3.0.4
I used the instructions from the site here but when I type
mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
I get
C:\wxWidgets-3.0.4\build\msw>mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
if not exist ..\..\lib\gcc_dll\msw mkdir ..\..\lib\gcc_dll\msw
process_begin: CreateProcess(NULL, -c "if not exist ..\..\lib\gcc_dll\msw mkdir ..\..\lib\gcc_dll\msw", ...) failed.
make (e=2): The system cannot find the file specified.
makefile.gcc:5642: recipe for target '..\..\lib\gcc_dll\msw' failed
mingw32-make.exe: *** [..\..\lib\gcc_dll\msw] Error 2
So, I cannot figure out the problem. Why I cannot continue.

I suspect you have some Cygwin/MSYS utilities in your PATH and they don't work with these makefiles which are explicitly intended for being used from DOS-like environments.
If you want to use Cygwin, you should build wxWidgets using configure. Otherwise, type path to see the current value and remove anything containing mkdir.exe from it.

Related

How to integrate Package with both Cmake and Make files into Buildroot

I want to integrate the package amazon kinesis video streams webrtc SDK in buidroot. Can anyone guide me on how can I do this? I am a newbie with buildroot.
The issue is the examples available on the internet only discussion if the package has make the file only, the issue with webrtc SDK is that it has both Cmake and make file.
Executing CMake command builds the build and make command builds the application.
https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c
Cmake projects generally use make (or some other generated build system) to build the actual code. You should follow the instructions in the buildroot manual for a "Cmake package", and it should generally work out
In the manual, it's section 18.7
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages
Hi I tried adding package:
this is my amazon-kinesis-video-streams-webrtc-sdk-c.mk file:
################################################################################
#
# amazon-kinesis-video-streams-webrtc-sdk-c
#
################################################################################
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_VERSION = 1.6.0
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_SITE = $(call github,awslabs,amazon-kinesis-video-streams-webrtc-sdk-c,v$(BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_VERSION))
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_LICENSE = MIT
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_LICENSE_FILES = LICENSE-MIT
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_CONF_OPTS = -DBUILD_DEMOS=ON
BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C_INSTALL_STAGING = YES
$(eval $(cmake-package))
and this Config.in file:
config BR2_PACKAGE_AMAZON_KINESIS_VIDEO_STREAMS_WEBRTC_SDK_C
bool "amazon-kinesis-video-streams-webrtc-sdk-c"
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
help
web-rtc
But I am getting an error that CMakeTextfile does not exist.
make amazon-kinesis-video-streams-webrtc-sdk-c-rebuild
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_staging_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_target_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_images_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_host_installed
rm -f /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_built
>>> amazon-kinesis-video-streams-webrtc-sdk-c Extracting
>>> amazon-kinesis-video-streams-webrtc-sdk-c Patching
>>> amazon-kinesis-video-streams-webrtc-sdk-c Configuring
(mkdir -p /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ && cd /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ && rm -f CMakeCache.txt && PATH="/home/bilal/work/buildroot/output/host/bin:/home/bilal/work/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" /usr/local/bin/cmake /home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/ -DCMAKE_TOOLCHAIN_FILE="/home/bilal/work/buildroot/output/host/share/buildroot/toolchainfile.cmake" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_DOC=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLE=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON )
CMake Error: The source directory "/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
package/pkg-generic.mk:249: recipe for target '/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_configured' failed
make[1]: *** [/home/bilal/work/buildroot/output/build/amazon-kinesis-video-streams-webrtc-sdk-c/.stamp_configured] Error 1
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2

CMake is not found when running through make

I'm trying to build https://github.com/AlbertWerner/cryptonotecoinwallet and facing an issue.
According to the README of the repo, I can run cmake command and it completes without any errors. But then, when I run make, it gives me the below error.
$ make
make: /usr/bin/cmake: Command not found
make: *** [Makefile:5138: cmake_check_build_system] Error 127
I'm using MSYS on Windows and here are the corresponding details.
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/mingw32/bin
$ which cmake
/mingw32/bin/cmake
Seems like it's looking for cmake in the wrong path.
Makefile
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system # <== Line 5139
I'm not sure what's wrong. Please help me out.
Thanks.
Make sure that you launch MSYS2 using the mingw32.exe executable at the top level of your MSYS2 installation, and that you use that environment when you first run cmake. If you ran CMake in a different environment, remove all the files it created. The commands for running cmake and building the project should be something like this, assuming the developers have set it up in a reasonable way:
mkdir build
cd build
cmake .. -G"MSYS Makefiles"
make
I didn't try this myself because I am wary of running random code from the internet, but I found this note in the CMakefile indicating that the developers do not support MSYS2:
if (WIN32)
if (NOT MSVC)
message(FATAL_ERROR "Only MSVC is supported on this platform")
endif ()
...
So you will have to spend some effort on porting the Windows-specific code in this program to GCC if you really want to do this.

Compiling a static version of wxWidgets

I tried a lot now but nothing is working..
I saw a lot of posts about this and a lot of answeres, but none of it is working for me...
Did anybody successfully build wxWidgets as static and now the right commands?
I downloaded wxWidgets here: http://www.wxwidgets.org/downloads/
I tried for example the following commands:
mingw32-make -f makefile.gcc -j4 SHARED=0 MONOLITHIC=1 BUILD=release clean
mingw32-make -f makefile.gcc -j4 SHARED=0 MONOLITHIC=1 BUILD=release
or this:
mingw32-make -f makefile.gcc -j4 SHARED=0 MONOLITHIC=1 BUILD=release clean
mingw32-make -f makefile.gcc -j4 SHARED=0 MONOLITHIC=1 BUILD=release
But when the build is finished and I tried to compile a simple programm in Code::Blocks I get a lot of 'undefined reference' errors.
Has anybody experience with it and successfully build a static copie of wxWdigets?
And if so, could you please tell me the commands you used...
I have a dynamic build which I already build and this is working... but I need a static version so I can get a working standalone exe....
If you want to see how to build wxWidgets, good..but no with mingw, it takes ages...you can try binaries for both compilers, see wx's sourceforge site.

cannot find -lwxmsw30u_core and -lwxbase30u in codeblocks

I am getting error like this. I have searched my wxwidgets folder\lib\gcc_dll this particular libraries are not build. Am i missing something here?
I have used this command to build wxwidgets:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
You have used MONOLITHIC=1 for some reason. If this was intentional, you need to link with the single library produced in this case and not the separate core and base libraries. If it wasn't, then you should remove the build directories (build\msw\gcc_mswu and lib\gcc_dll) and rebuild without using it.

wxWidget 2.8.12 not working in Codeblocks

I'm learning to use wxWidget 2.8.12 with Codeblocks 12.11. I have followed the instructions on this site to install wxWidgets and Codeblocks:
http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
When I try to create the project and run the demo app I get the error:
fatal error: wx/setup.h: No such file or directory
The following picture will show this better:
I have followed the instructions, but still I get the error...what seems to be the problem? :(
Thnx for any help
P.S.
Here is an overview what I have done:
1) I downloaded Codeblocks including MinGW (codeblocks-12.11mingw-setup.exe)
http://www.codeblocks.org/downloads/26#windows and I have installed them using the .exe file
2) I have edited my User PATH environment variable to according to the reference page I have used
3) I have downloaded wxWidgets installer from this link and installed it:
http://sourceforge.net/projects/wxwindows/files/2.8.12/wxMSW-2.8.12-Setup.exe/download?use_mirror=garr
4) I have entered the directory C:\<wxWidgets root>\build\msw and inputted the following command in command prompt:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
After letting wxWidgets build and trying to run my demo app I get the error I mentioned in Codeblocks :(
NOTICE FUTURE READERS: Install wxWidgets to a directory without whitespace in the path name! Otherwise this will cause trouble
Please have a look at the Below Link which i have put.It will be very useful.I have also installed wxWidget 2.8.12 with Codeblocks 12.11 using This Link.
Setting up wxWidgets(2.9.4) with Code::Blocks(12.11) in Windows
Type These below steps in Command Prompt after you finish installing the wxWidgets2.8.12 and CODEBLOCKS 12.11.
gcc -v
mingw32-make -v
cd /D C:\wxWidgets-2.8.12\build\msw
mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=1 UNICODE=1
mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1
If the problem still persists after doing all the above steps then You're missing an important compiler search path in your build options.
Make sure you choose the correct wxWidgets build configuration when running the wxWidgets project wizard.
If re-running the wizard isn't an option, then open your project's build options and add "$(#wx.lib)\gcc_dll\mswu" (assuming a monolithic Unicode DLL build) to the compiler search paths.