Hello,
I cannot compile/execute the win 64 app.
The error is this: "the code execution cannot continue because wxmsw315u_gcc_custom.dll was not found. reinstallling could fix the problem.."
I compiled the program with dev-cpp with the -m64 option and it dosen't issue any errors. I try to link it with the shared library wxmsw315u_gcc_custom.dll but it dosent work If I rename the file as wxmsw315u_gcc_custom64.dll it still asks for the other library although I don't mention it anymore. Why does it ask for a dll that I don't mention?!! How does it know that my original dll file was so called??!!
I checked them and the final executable and the shared library are 64bit.
I also use static gcc linking. Can we mix static and dinamic linking in an executable?
Thank you!
My conifg:
windows 10
winlibs-gcc-10.3.0
wxWidgets 3.1.5
The compiler issues this automatticaly:
Processing makefile...
--------
- Makefile Processor: C:\prg\winlibs-gcc-10.3.0\mingw64\bin\mingw32-make.exe
- Command: mingw32-make.exe -f "C:\prg\src\Makefile.win" all
g++.exe -c testgui.cpp -o testgui.o -I"C:/prg/winlibs-gcc-10.3.0/mingw64/include" -I"C:/prg/winlibs-gcc-10.3.0/mingw64/x86_64-w64-mingw32/include" -I"C:/prg/winlibs-gcc-10.3.0/mingw64/lib/gcc/x86_64-w64-mingw32/10.3.0/include" -I"C:/prg/wxWidgets-3.1.5/include" -m64
g++.exe testgui.o -o testgui.exe -L"C:/prg/winlibs-gcc-10.3.0/mingw64/lib" -L"C:/prg/winlibs-gcc-10.3.0/mingw64/x86_64-w64-mingw32/lib" -L"C:/prg/wxWidgets-3.1.5/lib/gcc_dll64" -static-libgcc -l:wxmsw315u_gcc_custom64.dll -mwindows
Compilation results...
--------
- Errors: 0
- Warnings: 0
- Output Filename: C:\prg\src\testgui.exe
- Output Size: 281,3486328125 KiB
- Compilation Time: 7,83s
Cannot compile a basic 64bit Windows App
Re: Cannot compile a basic 64bit Windows App
As you can see from the build log, this not a compilation problem.
Any program using DLLs not provided by Windows must be able to find them. In another words, the DLLs should be in the folder where the executable is, or in PATH (I would not recommend that for wxWidgets and GCC DLLs).
Looking at your post history, I would recommend reading a primer on compiling and running programs. In the long run, it could save you lot of time and effort...
Any program using DLLs not provided by Windows must be able to find them. In another words, the DLLs should be in the folder where the executable is, or in PATH (I would not recommend that for wxWidgets and GCC DLLs).
Looking at your post history, I would recommend reading a primer on compiling and running programs. In the long run, it could save you lot of time and effort...
Re: Cannot compile a basic 64bit Windows App
PB,
I think on Windows the usual place to put DLL is c:\Program Files\<program_name> and then update the PATH.
However I agree that this is not feasible during development.
Thank you.
I think on Windows the usual place to put DLL is c:\Program Files\<program_name> and then update the PATH.
However I agree that this is not feasible during development.
Thank you.
Re: Cannot compile a basic 64bit Windows App
AFAIK, most programs do not add their folder to the PATH. Usually only command line utilities do that, GUI programs are not launched from the command line...
Re: Cannot compile a basic 64bit Windows App
Hi!
thanks, I just remembered that I need to copy the dll into the same folder, at least..
It works, but not as expected, as I said.
I compiled my programm with this option: -l:wxmsw315u_gcc_custom64.dll
This dll is a copy and renamed file of the original one.
But my programm it requires the original compiled version,named: -l:wxmsw315u_gcc_custom.dll
I copy that original file, and it works.
How is that possible??!! Who said to my programm to search for that library file?!
thanks, I just remembered that I need to copy the dll into the same folder, at least..
It works, but not as expected, as I said.
I compiled my programm with this option: -l:wxmsw315u_gcc_custom64.dll
This dll is a copy and renamed file of the original one.
But my programm it requires the original compiled version,named: -l:wxmsw315u_gcc_custom.dll
I copy that original file, and it works.
How is that possible??!! Who said to my programm to search for that library file?!
Re: Cannot compile a basic 64bit Windows App
Hi,
Thank you.
Then this is the DLL it will look for.
Not sure what you mean here. Why do you need to rename the file?
No, t is not. It will look for the library you are linking against.
I don't know. Something else is happening here that you don't say...
Thank you.
Re: Cannot compile a basic 64bit Windows App
Hi again,
the "compiled renamed file" means the original wxwidgets library. It had no "64" at the end of its name.
So, to summarize:
1. I compiled wxwidgets with the whole and only 64bit toolchain. I got the this shared library file:wxmsw315u_gcc_custom.dll
2. I wanted to have the 2 libraries, the 32bit that I had compiled earlier, and the 64bit library at hand, so I renamed wxmsw315u_gcc_custom.dll to wxmsw315u_gcc_custom64.dll
3. I compiled my own simple programm and linked it as described above, with -l:wxmsw315u_gcc_custom64.dll
4. I forgot to copy the lib, but the programm asks instead for this one: wxmsw315u_gcc_custom.dll
5. I copy now the original library with its oringinal name, without "64" (although it is 64bit internally), and... it works!!!
How is that possible??!! Where does it take the lib name from if not from my specification?
the "compiled renamed file" means the original wxwidgets library. It had no "64" at the end of its name.
So, to summarize:
1. I compiled wxwidgets with the whole and only 64bit toolchain. I got the this shared library file:wxmsw315u_gcc_custom.dll
2. I wanted to have the 2 libraries, the 32bit that I had compiled earlier, and the 64bit library at hand, so I renamed wxmsw315u_gcc_custom.dll to wxmsw315u_gcc_custom64.dll
3. I compiled my own simple programm and linked it as described above, with -l:wxmsw315u_gcc_custom64.dll
4. I forgot to copy the lib, but the programm asks instead for this one: wxmsw315u_gcc_custom.dll
5. I copy now the original library with its oringinal name, without "64" (although it is 64bit internally), and... it works!!!
How is that possible??!! Where does it take the lib name from if not from my specification?
Re: Cannot compile a basic 64bit Windows App
Hi,
You shouldn't rename anything - the compilation of 32 and 64-bit can be placed into different directories.
Just use "TARGET_CPU" option on the command line.
And then you link you software to the appropriate libraries with -L and -l.
So I urge you to build everything from scratch.
Thank you.
You shouldn't rename anything - the compilation of 32 and 64-bit can be placed into different directories.
Just use "TARGET_CPU" option on the command line.
And then you link you software to the appropriate libraries with -L and -l.
So I urge you to build everything from scratch.
Thank you.