Search found 11 matches

by keithsw11111
Mon May 20, 2019 9:51 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

So sample app works but merging same concept into my main code base shows errors ... something still not quite right.
by keithsw11111
Mon May 20, 2019 9:00 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

Ok ... I think i have it working ... the secret was recognising that if wxTheApp in the dll is null then i need to create a thread and initialise wxwidgets ... but if it is not null then i should just create the dialog and not try to initialise wxwidgets at all. I will leave the code up for future r...
by keithsw11111
Mon May 20, 2019 8:26 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

The thing that continues to puzzle me is why i can get it working in visual studio but not gcc.

Could it be i am statically linking visual studio and dynamically linking gcc?

Would that explain why vs has a zero instance handle when started while gcc has the instance already set by the host app?
by keithsw11111
Sun May 19, 2019 7:59 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

I have tried every combination I can think of in the bitbucket code and it still isnt right. I did look at the wxModularApp code but that is going to take some time as it only seems to have cmake builds and I have never managed to get a cmake to work ... there is always something not quite right and...
by keithsw11111
Sun May 19, 2019 12:13 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

Ok ... just playing this back to ensure i have it right. 1. The launching of the thread needs to be native. This is not a big overhead. In the thread I need to call wxInitialise etc to set everything up. 2. The interaction between the plugin and the main code also needs to recognise it is not on the...
by keithsw11111
Sat May 18, 2019 1:26 pm
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

I have updated the bitbucket code to create another thread and then display a modeless dialog rather than a frame. It kind of works but you can tell it isnt right and when I tried to apply it to the main code base it crashes because wxWidgets just does not seem to be in the right state. In visual st...
by keithsw11111
Sat May 18, 2019 10:02 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

Ok Max ... I am deep in a rabbit hole here and beginning to suspect I am making it much harder than I need to. I endeavoured to follow your instructions and ran into more issues ... but replacing the GetModuleHandle(NULL) with a GetModuleHandle("dll.dll") got the UI up but then I have asserts re wxM...
by keithsw11111
Sat May 18, 2019 5:48 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

I have built a minimal sample project and placed it in github. https://bitbucket.org/keithsw1111/exe_dll/src/master/ When run just press load, press unload and then close the exe frame. Check log.txt to see what happened internally. This is the log.txt file when run with visual studio: exe.exe OnIni...
by keithsw11111
Sat May 18, 2019 3:59 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

Sorry ... I didnt answer the DLL sample question ... mainly because I dont see how it is relevant. In both cases the DLL compiles and is called so there is no reason why the dll sample would not work. The issue arises with the use of the wxApp bootstrapping in the DLL and specifically the wxTheApp m...
by keithsw11111
Sat May 18, 2019 3:53 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

Re: DLL build with MSVC works but GCC wont

1. Version of wxWidgets - 3.1.1 2. Version of OS? - Windows 10 ... up to date 3. Version of compilers? - MSVC 2019, GCC 7.2.0 (mingw) 4. Did you use Cygwin environment or just plain MinGW? Or maybe you were cross-compiling? Did you mix them up? - Mingw 5. Did you use EXACTLY the same compiler comman...
by keithsw11111
Fri May 17, 2019 11:54 am
Forum: Compiler / Linking / IDE Related
Topic: DLL build with MSVC works but GCC wont
Replies: 16
Views: 536

DLL build with MSVC works but GCC wont

I have built a wxWidgets GUI app and then created a wxWidgets DLL which contains a IMPLEMENT_APP_NO_MAIN app with UI. When I compile it using MSVC it works perfectly. When the DLL loads the wxTheApp macro in the DLL returns null which is then correctly initialised using a call to wxEntryStart follow...