minimal sample does not work on Windows

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
Reactionic
In need of some credit
In need of some credit
Posts: 2
Joined: Sat Dec 04, 2021 7:31 pm

minimal sample does not work on Windows

Post by Reactionic »

Hello, I have built the library with MinGW according to docs/msw/install.md. The flags that I used for it like below:

Code: Select all

BUILD=release SHARED=0
Later I used existing CMakeLists file to build the minimal sample that comes with library. I can build it without any error or warning. However when I try to run it, I got an error like "Entry Point Not Found - minimal.exe is not found in dynamic link library."

Is the problem build configuration of cmake?
Last edited by Reactionic on Wed Dec 08, 2021 9:18 pm, edited 1 time in total.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: minimal sample does not work on Windows

Post by ONEEYEMAN »

Hi,
1. How many MinGW compilers do you have installed on that build machine you are using?
2. Why not use the same MinGW command to build minimal sample?

Thank you.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4182
Joined: Sun Jan 03, 2010 5:45 pm

Re: minimal sample does not work on Windows

Post by PB »

Reactionic wrote: Sat Dec 04, 2021 7:54 pm Later I use cmake to build minimal sample with exited CMakeLists file.
I understand it is a typo but I could not figure out what "exited" was supposed to be.
Reactionic wrote: Sat Dec 04, 2021 7:54 pm I can build it without any error or warning. However when I try to run it, I got an error like "Entry Point Not Found - minimal.exe is not found in dynamic link library."
The error is very odd, why would the OS looked for an .exe file inside a .DLL? You built wxWidgets as static but the compiler DLLs are still needed: Are those available? Are you running the sample from the command line or from Explorer?

I have experienced some odd DLL issues when I built the executable with one GCC distro but the DLLs that were found was from another one, see what oneeyman wrote.
Reactionic
In need of some credit
In need of some credit
Posts: 2
Joined: Sat Dec 04, 2021 7:31 pm

Re: minimal sample does not work on Windows

Post by Reactionic »

ONEEYEMAN wrote: Tue Dec 07, 2021 4:13 pm Hi,
1. How many MinGW compilers do you have installed on that build machine you are using?
2. Why not use the same MinGW command to build minimal sample?

Thank you.
1. I have only one that comes with Qt
2. I edited my first post. I guess it was confusing.

PB wrote: Tue Dec 07, 2021 5:28 pm
Reactionic wrote: Sat Dec 04, 2021 7:54 pm Later I use cmake to build minimal sample with exited CMakeLists file.
I understand it is a typo but I could not figure out what "exited" was supposed to be.
Reactionic wrote: Sat Dec 04, 2021 7:54 pm I can build it without any error or warning. However when I try to run it, I got an error like "Entry Point Not Found - minimal.exe is not found in dynamic link library."
The error is very odd, why would the OS looked for an .exe file inside a .DLL? You built wxWidgets as static but the compiler DLLs are still needed: Are those available? Are you running the sample from the command line or from Explorer?

I have experienced some odd DLL issues when I built the executable with one GCC distro but the DLLs that were found was from another one, see what oneeyman wrote.
Yes, looking for the 'exe' itself is weird. Running it from command line or from Explorer gives the same result.
Building it as static did not generate any DLL file so I don't have them. Moreover compiler did not ask for them.

For example, I built the library again with command below.

Code: Select all

mingw32-make -f makefile.gcc BUILD=release SHARED=0 RUNTIME_LIBS=static -j8
Then instead of dealing with CMake, this time I followed the documentation and it says that the same command can be used to build minimal sample. So I did it and it generated a bulky exe (around 8MB). However, I got the same error in the first post.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: minimal sample does not work on Windows

Post by ONEEYEMAN »

Hi,
So what you did is

cd wxWidgets\samples\minimal
mingw32-make -f makefile.gcc BUILD=release SHARED=0 RUNTIME_LIBS=static -j8
./minimal.exe

And you got exactly the same error:: ""Entry Point Not Found - minimal.exe is not found in dynamic link library".

Did you modify the sample or the Makefile in any way?
What version of MinGW do you have?
Is there a chance you have an older version of the compiler r the CRT from different MinGW install?

Thank you.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4182
Joined: Sun Jan 03, 2010 5:45 pm

Re: minimal sample does not work on Windows

Post by PB »

Reactionic wrote: Wed Dec 08, 2021 9:32 pm For example, I built the library again with command below.

Code: Select all

mingw32-make -f makefile.gcc BUILD=release SHARED=0 RUNTIME_LIBS=static -j8
AFAIK, RUNTIME_LIBS is MSVC only, for GCC a compiler switch must be used, see for example chapter 3.6.7 my guide. So, compiler DLLs are still needed at runtime. Regardless, the error is still odd .

BTW, "gcc that came with Qt" is obviously entirely insufficient to identify a mingw distribution.
Post Reply