Unable to successfully compile wxWidgets-3.0.4
Re: Unable to successfully compile wxWidgets-3.0.4
and just to be clear I have done what you asked several times already. I think the issue has to do with creating the dll using "SHARED =1".
I guess I do not really need a dll. But I would like to know why my machine will not create one.
thx
I guess I do not really need a dll. But I would like to know why my machine will not create one.
thx
Re: Unable to successfully compile wxWidgets-3.0.4
really?!
Where is the documentation?
Where is the documentation?
Re: Unable to successfully compile wxWidgets-3.0.4
Hi,
Like I said - try with the unmodified config.gcc file and a simple command I posted.
Thank you.
Like I said - try with the unmodified config.gcc file and a simple command I posted.
Thank you.
Re: Unable to successfully compile wxWidgets-3.0.4
From the dos prompt:
// According to wxWidgets install.txt using dos prompt is correct when using makefile.gcc.
SET PATH=C:\mingw64\bin
cd ..\wxWidgets-3.0.4\build\msw
I changed my current config.gcc to config.gcc.bak
Added a clean copy of config.gcc.
ran: mingw32-make -f makefile.gcc clean
ran: mingw32-make -f makefile.gcc BUILD=debug
According to my documentation SHARED=0 is the default.
Build complete.
cd ..\wxWidgets-3.0.4\samples\minimal
mingw32-make -f mafefile.gcc
minimal.exe is in the ..\samples\minimal\gcc_mswud\ - The minimal.exe in this folder runs fine.
minimal.exe is in the ..\samples\minimal\gcc_mswuddll\ - The minimal.exe in this folder
passes an error. "The program can't start because wxmsw30ud_gcc_custom.dll
is missing from your computer.
run: ..\minimal\mingw32-make -f makefile.gcc clean
cd ..\wxWidgets-3.0.4\build\msw
run: ..\msw\mingw32-make -f makefile.gcc clean
run: ..\msw\mingw32-make -f makefile.gcc BUILD=debug SHARED=1
This was a little different. The build completed with no passed errors.
cd ..\wxWidgets-3.0.4\samples\minimal\
run: mingw32-make -f makefile.gcc
// -- LOG -- //
c:\wxWidgets-3.0.4\samples\minimal>mingw32-make -f makefile.gcc
if not exist gcc_mswud mkdir gcc_mswud
windres --use-temp-file -i../../samples/sample.rc -ogcc_mswud\minimal_sample_rc.
o --define __WXMSW__ --define _UNICODE --include-dir .\..\..\lib\gcc_l
ib\mswud --include-dir ./../../include --include-dir . --include-dir ./../../s
amples --define NOPCH
g++ -c -o gcc_mswud\minimal_minimal.o -g -O0 -mthreads -DHAVE_W32API_H -D__WXMS
W__ -D_UNICODE -I.\..\..\lib\gcc_lib\mswud -I.\..\..\include -W -Wall -I
. -I.\..\..\samples -DNOPCH -Wno-ctor-dtor-privacy -MTgcc_mswud\minimal_min
imal.o -MFgcc_mswud\minimal_minimal.o.d -MD -MP minimal.cpp
g++ -o gcc_mswud\minimal.exe gcc_mswud\minimal_sample_rc.o gcc_mswud\minimal_min
imal.o -g -mthreads -L.\..\..\lib\gcc_lib -Wl,--subsystem,windows -mwindows
-lwxmsw30ud_core -lwxbase30ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxr
egexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -
lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwi
ninet
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxmsw30ud_core
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxbase30ud
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxtiffd
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxjpegd
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxpngd
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxzlibd
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxregexud
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxexpatd
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [makefile.gcc:231: gcc_mswud\minimal.exe] Error 1
// -- END LOG -- //
There is no minimal.exe in the gcc_mswud folder. There are no other gcc_name folders
present.
Potentially relevent: I cannot successfully build wxWidgets-3.0.4 using msys2
and ..\configure --enable-debug
I get an error that says something about Borland Builder unexpected. I do not remember the
full line. But I did try removing all PATH info to BB6 and rerunning configure. It did not work.
End excersize.
Thx
// According to wxWidgets install.txt using dos prompt is correct when using makefile.gcc.
SET PATH=C:\mingw64\bin
cd ..\wxWidgets-3.0.4\build\msw
I changed my current config.gcc to config.gcc.bak
Added a clean copy of config.gcc.
ran: mingw32-make -f makefile.gcc clean
ran: mingw32-make -f makefile.gcc BUILD=debug
According to my documentation SHARED=0 is the default.
Build complete.
cd ..\wxWidgets-3.0.4\samples\minimal
mingw32-make -f mafefile.gcc
minimal.exe is in the ..\samples\minimal\gcc_mswud\ - The minimal.exe in this folder runs fine.
minimal.exe is in the ..\samples\minimal\gcc_mswuddll\ - The minimal.exe in this folder
passes an error. "The program can't start because wxmsw30ud_gcc_custom.dll
is missing from your computer.
run: ..\minimal\mingw32-make -f makefile.gcc clean
cd ..\wxWidgets-3.0.4\build\msw
run: ..\msw\mingw32-make -f makefile.gcc clean
run: ..\msw\mingw32-make -f makefile.gcc BUILD=debug SHARED=1
This was a little different. The build completed with no passed errors.
cd ..\wxWidgets-3.0.4\samples\minimal\
run: mingw32-make -f makefile.gcc
// -- LOG -- //
c:\wxWidgets-3.0.4\samples\minimal>mingw32-make -f makefile.gcc
if not exist gcc_mswud mkdir gcc_mswud
windres --use-temp-file -i../../samples/sample.rc -ogcc_mswud\minimal_sample_rc.
o --define __WXMSW__ --define _UNICODE --include-dir .\..\..\lib\gcc_l
ib\mswud --include-dir ./../../include --include-dir . --include-dir ./../../s
amples --define NOPCH
g++ -c -o gcc_mswud\minimal_minimal.o -g -O0 -mthreads -DHAVE_W32API_H -D__WXMS
W__ -D_UNICODE -I.\..\..\lib\gcc_lib\mswud -I.\..\..\include -W -Wall -I
. -I.\..\..\samples -DNOPCH -Wno-ctor-dtor-privacy -MTgcc_mswud\minimal_min
imal.o -MFgcc_mswud\minimal_minimal.o.d -MD -MP minimal.cpp
g++ -o gcc_mswud\minimal.exe gcc_mswud\minimal_sample_rc.o gcc_mswud\minimal_min
imal.o -g -mthreads -L.\..\..\lib\gcc_lib -Wl,--subsystem,windows -mwindows
-lwxmsw30ud_core -lwxbase30ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxr
egexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -
lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwi
ninet
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxmsw30ud_core
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxbase30ud
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxtiffd
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxjpegd
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxpngd
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxzlibd
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxregexud
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lwxexpatd
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [makefile.gcc:231: gcc_mswud\minimal.exe] Error 1
// -- END LOG -- //
There is no minimal.exe in the gcc_mswud folder. There are no other gcc_name folders
present.
Potentially relevent: I cannot successfully build wxWidgets-3.0.4 using msys2
and ..\configure --enable-debug
I get an error that says something about Borland Builder unexpected. I do not remember the
full line. But I did try removing all PATH info to BB6 and rerunning configure. It did not work.
End excersize.
Thx
Re: Unable to successfully compile wxWidgets-3.0.4
I tried again to build wxWidgets-3.0.4 using configure and ran across this,
configure:4204: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure:4206: WARNING: *** Please report the build results to [email protected].
It seems you have dealt with this before.
I'm going to try ../configure --enable-debug --with-msw
configure:4204: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure:4206: WARNING: *** Please report the build results to [email protected].
It seems you have dealt with this before.
I'm going to try ../configure --enable-debug --with-msw
Re: Unable to successfully compile wxWidgets-3.0.4
Well, ../configure --enable-debug --with-msw did not work.
last line: configure error: unknownsystem type x86_64-pc-msys
It seems msys2 has a problem identifying or running the configure on a x86_64.
I changed to msys1.0.11. It successfully passed the ../configure --enable-debug --with-msw.
This --with switch, where is it documented?
I'll let you know if configure finishes.
make successfully create the dlls in wx_debug folder.
But for some reason I cannot run the make command in the /samples/minimal/dir.
make: *** No targets specified and no makefile found. Stop.
$ ls
Info_carbon.plist minimal_iphone.xcodeproj
Info_cocoa.plist minimal_vc7.vcproj
Info_iphone.plist minimal_vc8.vcproj
Makefile.in minimal_vc9.vcproj
Minimal.icc sample.icns
borland.bdsproj wxbase30u_gcc_custom.dll
borland_ide.cpp wxbase30u_net_gcc_custom.dll
descrip.mms wxbase30u_xml_gcc_custom.dll
gcc_mswud wxmsw30u_adv_gcc_custom.dll
makefile.bcc wxmsw30u_aui_gcc_custom.dll
makefile.gcc wxmsw30u_core_gcc_custom.dll
makefile.mic wxmsw30u_gl_gcc_custom.dll
makefile.unx wxmsw30u_html_gcc_custom.dll
makefile.vc wxmsw30u_media_gcc_custom.dll
makefile.wat wxmsw30u_propgrid_gcc_custom.dll
minimal.bkl wxmsw30u_qa_gcc_custom.dll
minimal.cpp wxmsw30u_ribbon_gcc_custom.dll
minimal.dsp wxmsw30u_richtext_gcc_custom.dll
minimal.plc wxmsw30u_stc_gcc_custom.dll
minimal_carbon.xcodeproj wxmsw30u_webview_gcc_custom.dll
minimal_cocoa.xcodeproj wxmsw30u_xrc_gcc_custom.dll
For now I am just going to save this folder for later.
last line: configure error: unknownsystem type x86_64-pc-msys
It seems msys2 has a problem identifying or running the configure on a x86_64.
I changed to msys1.0.11. It successfully passed the ../configure --enable-debug --with-msw.
This --with switch, where is it documented?
I'll let you know if configure finishes.
make successfully create the dlls in wx_debug folder.
But for some reason I cannot run the make command in the /samples/minimal/dir.
make: *** No targets specified and no makefile found. Stop.
$ ls
Info_carbon.plist minimal_iphone.xcodeproj
Info_cocoa.plist minimal_vc7.vcproj
Info_iphone.plist minimal_vc8.vcproj
Makefile.in minimal_vc9.vcproj
Minimal.icc sample.icns
borland.bdsproj wxbase30u_gcc_custom.dll
borland_ide.cpp wxbase30u_net_gcc_custom.dll
descrip.mms wxbase30u_xml_gcc_custom.dll
gcc_mswud wxmsw30u_adv_gcc_custom.dll
makefile.bcc wxmsw30u_aui_gcc_custom.dll
makefile.gcc wxmsw30u_core_gcc_custom.dll
makefile.mic wxmsw30u_gl_gcc_custom.dll
makefile.unx wxmsw30u_html_gcc_custom.dll
makefile.vc wxmsw30u_media_gcc_custom.dll
makefile.wat wxmsw30u_propgrid_gcc_custom.dll
minimal.bkl wxmsw30u_qa_gcc_custom.dll
minimal.cpp wxmsw30u_ribbon_gcc_custom.dll
minimal.dsp wxmsw30u_richtext_gcc_custom.dll
minimal.plc wxmsw30u_stc_gcc_custom.dll
minimal_carbon.xcodeproj wxmsw30u_webview_gcc_custom.dll
minimal_cocoa.xcodeproj wxmsw30u_xrc_gcc_custom.dll
For now I am just going to save this folder for later.
Last edited by Waingrove on Tue Mar 31, 2020 2:11 pm, edited 2 times in total.
Re: Unable to successfully compile wxWidgets-3.0.4
Hi,
You do understand that the library and the sample(s) has to be built with EXACTLY THE SAME options, right?
So, why are you building the library with:
but the sample with
Thank you.
P.S.: Also, make sure to copy the appropriate DLLs to the samples\minimal folder in order for the Windows to find it...
You do understand that the library and the sample(s) has to be built with EXACTLY THE SAME options, right?
So, why are you building the library with:
Code: Select all
mingw32-make -f makefile.gcc BUILD=debug SHARED=1
Code: Select all
mingw32-make -f makefile.gcc
P.S.: Also, make sure to copy the appropriate DLLs to the samples\minimal folder in order for the Windows to find it...
Re: Unable to successfully compile wxWidgets-3.0.4
No I did not know I had to use the same options. I have run it without a few times with no issues.ONEEYEMAN wrote: ↑Tue Mar 31, 2020 1:29 pm Hi,
You do understand that the library and the sample(s) has to be built with EXACTLY THE SAME options, right?
So, why are you building the library with:
but the sample withCode: Select all
mingw32-make -f makefile.gcc BUILD=debug SHARED=1
Thank you.Code: Select all
mingw32-make -f makefile.gcc
I am assuming because compiling wxWidgets with mingw32-make is supposed to be done with
a dos prompt that there is no need for the --with-msw option. And it is not in the config.gcc file either.
Ok, successfully ran ..\minimal\mingw32-make -f makefile.gcc BUILD=debug SHARED=1
with all dll files in the minimal folder \minimal\gcc_mswuddll\
Learning is so painful.
Thx
Last edited by Waingrove on Tue Mar 31, 2020 3:32 pm, edited 1 time in total.
Re: Unable to successfully compile wxWidgets-3.0.4
Hi,
The sample build failed because you didn't use the same options to build it.
<directory_configure_ran_from>/samples/minimal
But playin with the MSYS and configure is not necessary - just use plain MINGW from the DOS command prompt by passing the appropriate options.
Thank you.
If the buid completed without any errors the libraries should be there.Waingrove wrote: ↑Tue Mar 31, 2020 12:54 pm From the dos prompt:
// According to wxWidgets install.txt using dos prompt is correct when using makefile.gcc.
SET PATH=C:\mingw64\bin
cd ..\wxWidgets-3.0.4\build\msw
I changed my current config.gcc to config.gcc.bak
Added a clean copy of config.gcc.
ran: mingw32-make -f makefile.gcc clean
ran: mingw32-make -f makefile.gcc BUILD=debug
According to my documentation SHARED=0 is the default.
Build complete.
cd ..\wxWidgets-3.0.4\samples\minimal
mingw32-make -f mafefile.gcc
minimal.exe is in the ..\samples\minimal\gcc_mswud\ - The minimal.exe in this folder runs fine.
minimal.exe is in the ..\samples\minimal\gcc_mswuddll\ - The minimal.exe in this folder
passes an error. "The program can't start because wxmsw30ud_gcc_custom.dll
is missing from your computer.
run: ..\minimal\mingw32-make -f makefile.gcc clean
cd ..\wxWidgets-3.0.4\build\msw
run: ..\msw\mingw32-make -f makefile.gcc clean
run: ..\msw\mingw32-make -f makefile.gcc BUILD=debug SHARED=1
This was a little different. The build completed with no passed errors.
The sample build failed because you didn't use the same options to build it.
Just run the usual:This --with switch, where is it documented?
Code: Select all
../configure --help
Try to run make from:make successfully create the dlls in wx_debug folder.
But for some reason I cannot run the make command in the /samples/minimal/dir.
make: *** No targets specified and no makefile found. Stop.
<directory_configure_ran_from>/samples/minimal
But playin with the MSYS and configure is not necessary - just use plain MINGW from the DOS command prompt by passing the appropriate options.
Thank you.
Re: Unable to successfully compile wxWidgets-3.0.4
Next question.
Does the ..\build\msw\gcc_mswuddll\ folder need to be renamed wx_debug_shared and put in the ..\wxWidgets-3.0.4\lib\ folder to use with C::B?
If the dlls are already in the ..\wxWidgets-3.0.4\lib\ folder then why do the dlls have to be in the ..\samples\minimal\gcc_mswuddll\ folder to run the minimal.exe?
PATH includes ..\wxWidgets-3.0.4
Shouldn't mingw32-make.exe be able to find them?
Does the ..\build\msw\gcc_mswuddll\ folder need to be renamed wx_debug_shared and put in the ..\wxWidgets-3.0.4\lib\ folder to use with C::B?
If the dlls are already in the ..\wxWidgets-3.0.4\lib\ folder then why do the dlls have to be in the ..\samples\minimal\gcc_mswuddll\ folder to run the minimal.exe?
PATH includes ..\wxWidgets-3.0.4
Shouldn't mingw32-make.exe be able to find them?
Re: Unable to successfully compile wxWidgets-3.0.4
Hi,
You need to get acquinted with how OS works.
In order to execute the binary OS needs to pick up all the libraries the binaries are linked with.
Some libraries (default OS ones and the CRT ones) are stored in the well known place. This place is set inside the PATH variable and that's how the linker picks up the system DLLs and CRTs one.
However if yw you don't need ou link with any other libraries they needs to be available at the time of execution because obviously otherwise the execution fails.
The best way to make them available is to copy the DLLs to the place where the binary is located.
That way the system library location will not be clogged and anytime you need to pdate any of the libraries you know where they are.
It is simple and secure.
That's why compilation and linking on Widows is preferred to be static - the CRT is already there on any Windows machine and Windows DLL is already in place.
However in *nix world it is generally frown upon, because in *nix you can install multiple version of thesame software in parallel and choose which one is active at any given time. The linker on *nix knows exactly where all those libraries are and it knows which version is selected so it can pickup the appropriate thing and load it dynamically on request.
The only reason to build wxWidgets as DLL is to make a DLL that will be using wxWidgets. That way you will guarantee that there will be no issues when your DLL is loaded.
I hope that is clear.
Now you don't need to rename anything - all you need to do is tell C::B or any other build system where the DLLs are for the linker to do the job.
But when you execute - the libraries has to be available.
Thank you.
You need to get acquinted with how OS works.
In order to execute the binary OS needs to pick up all the libraries the binaries are linked with.
Some libraries (default OS ones and the CRT ones) are stored in the well known place. This place is set inside the PATH variable and that's how the linker picks up the system DLLs and CRTs one.
However if yw you don't need ou link with any other libraries they needs to be available at the time of execution because obviously otherwise the execution fails.
The best way to make them available is to copy the DLLs to the place where the binary is located.
That way the system library location will not be clogged and anytime you need to pdate any of the libraries you know where they are.
It is simple and secure.
That's why compilation and linking on Widows is preferred to be static - the CRT is already there on any Windows machine and Windows DLL is already in place.
However in *nix world it is generally frown upon, because in *nix you can install multiple version of thesame software in parallel and choose which one is active at any given time. The linker on *nix knows exactly where all those libraries are and it knows which version is selected so it can pickup the appropriate thing and load it dynamically on request.
The only reason to build wxWidgets as DLL is to make a DLL that will be using wxWidgets. That way you will guarantee that there will be no issues when your DLL is loaded.
I hope that is clear.
Now you don't need to rename anything - all you need to do is tell C::B or any other build system where the DLLs are for the linker to do the job.
But when you execute - the libraries has to be available.
Thank you.
Re: Unable to successfully compile wxWidgets-3.0.4
Thank You ONEEYEMAN.
Learning is painful. Knowing is devine!
Learning is painful. Knowing is devine!