no such file or directory wile compiling

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Nobody-86
In need of some credit
In need of some credit
Posts: 4
Joined: Sun Aug 30, 2015 4:50 pm

no such file or directory wile compiling

Post by Nobody-86 »

Hi,

I try to compile wxWidgets-3.0.2 under Win7 using TDM-GCC-64. To do this, I use this command:

mingw32-make -j4 -f makefile.gcc SHELL=CMD.exe MONOLITHIC=1 BUILD=release UNICODE=1 SHARED=1 CXXFLAGS="-std=gnu++11"

After a while I get this error:
g++ -shared -fPIC -o ..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll gcc_mswudll\monodll_dummy.o gcc_mswudll\monodll_any.o
(...)
LOTS AND LOTS OF STUFF
(...)
gcc_mswudll\monodll_cshelp.o gcc_mswudll\monodll_ctrlcmn.o gcc_mswudll\monodll_ctrlsub.o gcc_mswudll\monodll_dcbase.o
(...)
gcc_mswudll\monodll_xh_odcombo.o gcc_mswudll\monodll_xh_panel.o gcc_mswudll\monodll_xh_propdlg.o
(...)
gcc_mswudll\monodll_richtextstyles.o gcc_mswudll\monodll_richtextsymboldlg.o gcc_mswudll\monodll_richtextxml.o gcc_mswudll\monodll_xh_richtext.o gcc
_mswudll\monodll_stc.o gcc_mswudll\monodll_PlatWX.o gcc_mswudll\monodll_ScintillaWX.o gcc_mswudll\monodll_xml.o gcc_mswudll\monodll_xtixml.o gcc_mswudll\monodll_version_rc.o -mthreads -L..\..\lib\gcc_dll -Wl,--out-implib=..\..\lib\gcc_dll\libwxmsw30u.a -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet ..\..\lib\gcc_dll\libwxscintilla.a
g++: error: cc_mswudll\monodll_ctrlsub.o: No such file or directory
g++: error: gc_mswudll\monodll_xh_panel.o: No such file or directory
makefile.gcc:5206: recipe for target '..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll' failed
mingw32-make: *** [..\..\lib\gcc_dll\wxmsw30u_gcc_custom.dll] Error 1
Which is wired, because all files are stored in ./gcc_mswudll. The command above also tells the directory correct.
Where is my mistake?
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: no such file or directory wile compiling

Post by PB »

If you searched the forum for the answer, you would have learned you had made no mistake. This is a known issue, sadly AFAIK there is no known solution.
See e.g. here: viewtopic.php?f=19&t=41240
walker
In need of some credit
In need of some credit
Posts: 6
Joined: Wed Jan 03, 2018 2:10 am

Re: no such file or directory wile compiling

Post by walker »

I got same problem when I use CMD shell from windows 7.

But when I use msys shell of MingW, I can compile them. Run the msys shell: "C:\MingW\msys\1.0\msys.bat"

The errors are "cannot find some *.o files ..." But I look at that folder, those files are there. The error message shows the path is wrong.

The scripts I used are:

mingw32-make -f makefile.gcc BUILD=debug SHARED=1 UNICODE=1 MONOLITHIC=0 CXXFLAGS="-std=gnu++11 -fno-keep-inline-dllexport" setup_h
mingw32-make -j2 -f makefile.gcc BUILD=debug SHARED=1 UNICODE=1 MONOLITHIC=0 CXXFLAGS="-std=gnu++11 -fno-keep-inline-dllexport"

mingw32-make -f makefile.gcc BUILD=debug SHARED=1 UNICODE=1 MONOLITHIC=1 CXXFLAGS="-std=gnu++11 -fno-keep-inline-dllexport" setup_h
mingw32-make -j2 -f makefile.gcc BUILD=debug SHARED=1 UNICODE=1 MONOLITHIC=1 CXXFLAGS="-std=gnu++11 -fno-keep-inline-dllexport"

flag option "-fno-keep-inline-dllexport" might not need.

I guess it is the limitation of string buffer in CMD.exe. Some string variables are truncated. The solution in following link to modify makefile.gcc does not work for me in CMD shell with SHELL=CMD.exe in script. ( "To fix issues when compiling static library with MONOLITHIC option" )

https://wiki.wxwidgets.org/Compiling_wx ... HIC_option

BTW, my path setting in computer property is:
MinGWBin=c:\MingW\bin;C:\MinGW\mingw32\bin;C:\MinGW\msys\1.0\bin;C:\MinGW\msys\1.0\sbin;C:\MinGW\libexec\gcc\mingw32\6.3.0
PATH=%MinGWBin%;%PATH%

I did not know if the path setting affects the scripts or not.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: no such file or directory wile compiling

Post by ONEEYEMAN »

Hi,
There is no gain compiling wxWidgets as MONOLITHIC library and it will create more issues in the long run..
This configuration is rarely checked by the core wx-dev's.

Thank you.
Post Reply