I'm trying to compile wxWidgets 3.0; I've downloaded the source and am using TDM-GCC (a repackaging of MinGW, as I understand it). I'm getting errors similar to the following when I try to compile the samples, and I have seen the same error when I try to compile the library:
D:\wxWidgets3.0\samples\access>mingw32-make -f makefile.gcc
windres --use-temp-file -i../../samples/sample.rc -ogcc_mswud\accesstest_sample_
rc.o --define __WXMSW__ --define _UNICODE --include-dir .\..\..\lib\gc
c_lib\mswud --include-dir ./../../include --include-dir . --include-dir ./../.
./samples --define NOPCH
The system cannot find the path specified.
windres: gcc exited with status 1
makefile.gcc:234: recipe for target 'gcc_mswud\accesstest_sample_rc.o' failed
mingw32-make: *** [gcc_mswud\accesstest_sample_rc.o] Error 1
I used Codelite's binary distribution of wxWidgets-3.0, and I'm able to compile and run the sample programs just fine, but I'd like to know what I was doing wrong; could someone point me in the right direction as to where I failed in compiling the library or the sample programs?
Thanks all!
Related
Hey I'm trying to build TBB on my Windows computer using MinGW & CMake. (gcc,,g++, ..)
I have already tried using the premade binaries but I keep getting undefined reference issues.
My cmake for the project I'm trying to import it in looks as following:
find_package(TBB REQUIRED tbb)
target_link_libraries(projectName PRIVATE ${TBB_IMPORTED_TARGETS})
I use the source code of https://github.com/oneapi-src/oneTBB/releases/tag/v2021.3.0 (latest)
and I make a build dir and cd into it and execute:
cmake .. -G "MinGW Makefiles"
followed by:
cmake --build .
also tried:
mingw32-make
Both result into
[ 1%] Building CXX object src/tbb/CMakeFiles/tbb.dir/address_waiter.cpp.obj
In file included from c:\users\refactor\downloads\onetbb-2021.3.0\onetbb-2021.3.0\include\oneapi\tbb\detail\_utils.h:26,
from C:\Users\Refactor\Downloads\oneTBB-2021.3.0\oneTBB-2021.3.0\src\tbb\address_waiter.cpp:17:
c:\users\refactor\downloads\onetbb-2021.3.0\onetbb-2021.3.0\include\oneapi\tbb\detail\_machine.h:67: error: ignoring '#pragma intrinsic ' [-Werror=unknown-pragmas]
67 | #pragma intrinsic(_mm_mfence)
|
compilation terminated due to -Wfatal-errors.
cc1plus.exe: all warnings being treated as errors
mingw32-make[2]: *** [src\tbb\CMakeFiles\tbb.dir\build.make:76: src/tbb/CMakeFiles/tbb.dir/address_waiter.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:454: src/tbb/CMakeFiles/tbb.dir/all] Error 2
mingw32-make: *** [makefile:165: all] Error 2```
As mentioned in the comments there are issues building with MinGW with the latest versions of TBB.
The last version of TBB I was able to build was 2020.0 using this command (replace intel64 with ia32 for 32-bit):
mingw32-make compiler=gcc arch=intel64 runtime=mingw tbb tbbmalloc CPLUS="g++ -static-libstdc++ -static-libgcc"
I have recently downloaded wxWidgets (installed from source but I don't think that is the problem) and I cannot figure out how to build the samples provided on linux. From what I can tell all the makefiles given are for windows machines and from the few things I have found online just say to run make in the directory but that just leaves me with a
make: *** No targets specified and no makefile found. Stop.
I have no idea how to build them. The particular samples I am trying to build can be found here:
https://github.com/wxWidgets/wxWidgets/tree/WX_3_0_BRANCH/samples/minimal
and I am using wxwidgets version: 3.0.5, Ubuntu: 20.04
,if any other information is needed please just ask
Not too sure if I'm just missing something for what, any help would be great, thanks
EDIT: I have tried to build them also using make -f makefile.gcc and get this error:
if not exist gcc_mswud mkdir gcc_mswud
make: -c: Command not found
make: [makefile.gcc:219: gcc_mswud] Error 127 (ignored)
windres --use-temp-file -i../../samples/sample.rc -ogcc_mswud\minimal_sample_rc.o --define __WXMSW__ --define _UNICODE --include-dir .\..\..\lib\gcc_lib\mswud --include-dir ./../../include --include-dir . --include-dir ./../../samples --define NOPCH
make: -c: Command not found
make: *** [makefile.gcc:234: gcc_mswud\minimal_sample_rc.o] Error 127
but from what I can gather this is because that makefile is meant for windows machines
You need to run the configure script to generate the make files for your system. There is a good article on this on the wiki. The configure script will produce make files for both the library and the samples.
On linux, this 2 step configure/make process is quite common for building libraries and programs.
I am building ASSIMP using cmake and mingw-w64 on windows 10 and it gives me "file too big" errors while creating the object code. I tried using MinGW and MinGW-w64 and both give me the same error. I am using the default settings, I configure the project with cmake, generate the makefile and then run mingw32-make. Is there some kind of flag I can set to fix this?
Compiler:
g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Here is the output:
[ 59%] Building CXX object code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileImporter.cpp.obj
[ 60%] Building CXX object code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileGen1.cpp.obj
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe:
CMakeFiles\assimp.dir\Importer\StepFile\StepFileGen1.cpp.obj: section .xdata$_ZNSt10_Head_baseILy0EPN6Assimp8StepFile29directed_dimensional_locationELb0EE7_M_headERKS4_:
string table overflow at offset 10000029
C:\Users\ANDREW~1.NOT\AppData\Local\Temp\ccwwseVM.s: Assembler messages:
C:\Users\ANDREW~1.NOT\AppData\Local\Temp\ccwwseVM.s: Fatal error: can't close CMakeFiles\assimp.dir\Importer\StepFile\StepFileGen1.cpp.obj: File too big
mingw32-make[2]: *** [code\CMakeFiles\assimp.dir\build.make:2485: code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileGen1.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:274: code/CMakeFiles/assimp.dir/all] Error 2
mingw32-make: *** [Makefile:129: all] Error 2
EDIT: I was using the master branch of Assimp from github, which has newer experimental features. I downloaded an older release version and I did not get the same errors.
This error is fixed by assimp itself https://github.com/assimp/assimp/issues/2406 Which version do you use?
What worked for me :
Go into the CMakeLists.txt and add:
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-O3")
Then compile with some options off:
cmake .. -G "Unix Makefiles" -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF
make -j4 && make install
It worked for 5.0.0-rc1 and 5.0.1 too.
i downloaded poco-1.6-all for windows and im trying to build it for cygwin, im getting this error after performing a make install i need some help because i don't know how to solve this NTDDI_VERSION error:
$ make install
make -C /cygdrive/c/poco-1.6.0-all/Foundation
make[1]: Entering directory '/cygdrive/c/poco-1.6.0-all/Foundation'
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/release_static
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_static
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/release_shared
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared
** Compiling src/ArchiveStrategy.cpp (debug, shared)
g++ -Iinclude -I/cygdrive/c/poco-1.6.0-all/CppUnit/include -I/cygdrive/c/poco-1.6.0-all/CppUnit/WinTestRunner/include -I/cygdrive/c/poco-1.6.0-all/Foundation/include -I/cygdrive/c/poco-1.6.0-all/XML/include -I/cygdrive/c/poco-1.6.0-all/JSON/include -I/cygdrive/c/poco-1.6.0-all/Util/include -I/cygdrive/c/poco-1.6.0-all/Net/include -I/cygdrive/c/poco-1.6.0-all/Crypto/include -I/cygdrive/c/poco-1.6.0-all/NetSSL_OpenSSL/include -I/cygdrive/c/poco-1.6.0-all/Data/include -I/cygdrive/c/poco-1.6.0-all/Data/SQLite/include -I/cygdrive/c/poco-1.6.0-all/Data/ODBC/include -I/cygdrive/c/poco-1.6.0-all/Data/MySQL/include -I/cygdrive/c/poco-1.6.0-all/MongoDB/include -I/cygdrive/c/poco-1.6.0-all/Zip/include -I/cygdrive/c/poco-1.6.0-all/PageCompiler/include -I/cygdrive/c/poco-1.6.0-all/PageCompiler/File2Page/include -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY -DPOCO_BUILD_HOST=PB00YCT7 -D_XOPEN_SOURCE=500 -g -D_DEBUG -c src/ArchiveStrategy.cpp -o /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o
In file included from c:\mingw\include\_mingw.h:35:0,
from c:\mingw\include\windows.h:28,
from include/Poco/UnWindows.h:90,
from include/Poco/Platform_WIN32.h:24,
from include/Poco/Foundation.h:102,
from include/Poco/ArchiveStrategy.h:23,
from src/ArchiveStrategy.cpp:17:
c:\mingw\include\sdkddkver.h:137:8: error: #error The _WIN32_WINNT value does not match NTDDI_VERSION
# error The _WIN32_WINNT value does not match NTDDI_VERSION
^
In file included from include/Poco/ArchiveStrategy.h:23:0,
from src/ArchiveStrategy.cpp:17:
include/Poco/Foundation.h:122:4: error: #error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually exclusive.
#error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually exclusive.
^
/cygdrive/c/poco-1.6.0-all/build/rules/compile:53: recipe for target '/cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o' failed
make[1]: *** [/cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o] Error 1
make[1]: Leaving directory '/cygdrive/c/poco-1.6.0-all/Foundation'
Makefile:69: recipe for target 'Foundation-libexec' failed
make: *** [Foundation-libexec] Error 2
Here is also the line i use to compile de code:
$ ./configure --config=CYGWIN --omit=NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQ --prefix=./_INSTALL
$ make clean
$ make -j4 -nodemos
$ make install
Any help with this error will be apreciated, thanks.
It's due to the MinGW has the c:\mingw\include\sdkddkver.h outdated in comparison to your Windows OS version. Take a look to this page:
Using the Windows Headers
And check that some #define's are not into the mentioned file. I just used Windows 8.1 and received the same error.
A solution could be to use an updated version from MinGW like MinGW-w64 or any Visual Studio version
Well i am trying to compile opencv on my own for eclipsecdt4. I am following a tutorial for codeblocks over here
http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/
I did the cmake thing with eclipse cdt4-mingw32makefile config(tried with just mingw32 makefile too) but the makefile isnt generating. When i do mingw32-make in the build directory it says
F:\ocv\build>mingw32-make
mingw32-make: *** No targets specified and no makefile found. Stop.
Here is a screenshot of the build directory
I had excatly the same problem....I solved it today...I forgot to press Generate in Cmake.....