Search found 68 matches

by Rob'
Thu May 25, 2023 6:34 am
Forum: C++ Development
Topic: How to check if a file is used by another process
Replies: 4
Views: 385

Re: How to check if a file is used by another process

wxLogNull solves the problem.

Thanks to all.
by Rob'
Wed May 24, 2023 2:47 pm
Forum: C++ Development
Topic: How to check if a file is used by another process
Replies: 4
Views: 385

How to check if a file is used by another process

I would like to delete a file if it is not in use. I tried if (wxFileName::FileExists(file)) { wxFile f; if (f.Access(file, wxFile::write)) { wxRemoveFile(file); } } It seems, it's always possible to access the file, so I get an error message. Is there another way to check that or to suppress the er...
by Rob'
Tue Jan 10, 2023 5:27 pm
Forum: C++ Development
Topic: Locale.Init() dosn't use system language
Replies: 3
Views: 283

Re: Locale.Init() dosn't use system language

We have the issue on different systems, e.g. Win11 or Windows Server 2019. All systems are set to German (language and region), and also the messages should be in German. I.e., the language/region combination exists, and it does not depend on the system. The documentation of bool wxLocale::Init (int...
by Rob'
Tue Jan 10, 2023 2:58 pm
Forum: C++ Development
Topic: Locale.Init() dosn't use system language
Replies: 3
Views: 283

Locale.Init() dosn't use system language

In our OnInit()-method we had used this code to get wx messages in system language: wxFileName path(wxTheApp->argv[0]); Locale.AddCatalogLookupPathPrefix(path.GetPath()); Locale.Init(); Since wx3.2 that dosn't work. Instead calling Init() with default parameters we have to provide Locale.GetSystemLa...
by Rob'
Fri Nov 11, 2022 1:44 pm
Forum: C++ Development
Topic: wxStandardPaths::Get() in 8.3 format
Replies: 14
Views: 708

Re: wxStandardPaths::Get() in 8.3 format

That means no solution from C::B. As a workaround I have choosen a different filename and shorter or equal than 8 characters for my INI file. I pass this filename as an argument to the executable. So it works also for debugging.

Thanks again.
by Rob'
Thu Nov 10, 2022 5:51 pm
Forum: C++ Development
Topic: wxStandardPaths::Get() in 8.3 format
Replies: 14
Views: 708

Re: wxStandardPaths::Get() in 8.3 format

That is exactly the case. Some of the subdirectories have spaces in their name. I will check the behavior in release mode tomorrow morning.
by Rob'
Thu Nov 10, 2022 5:19 pm
Forum: C++ Development
Topic: wxStandardPaths::Get() in 8.3 format
Replies: 14
Views: 708

Re: wxStandardPaths::Get() in 8.3 format

I can't explain it, hence my question here.
by Rob'
Thu Nov 10, 2022 4:41 pm
Forum: C++ Development
Topic: wxStandardPaths::Get() in 8.3 format
Replies: 14
Views: 708

Re: wxStandardPaths::Get() in 8.3 format

The differences are already in the debug build: If I start it w/o debugging, then it is okay. If I debug the same app, then I get the path in 8.3 format.
by Rob'
Thu Nov 10, 2022 3:06 pm
Forum: C++ Development
Topic: wxStandardPaths::Get() in 8.3 format
Replies: 14
Views: 708

Re: wxStandardPaths::Get() in 8.3 format

For testing I used the wxWidgets Application Template, which is created by Code::Blocks. These 2 lines I have added to the GUIFrame constructor: wxString str = wxStandardPaths::Get().GetExecutablePath(); wxMessageBox(str); The problem only occurs, if I debug the code. If I run the app in debug mode ...
by Rob'
Thu Nov 10, 2022 1:55 pm
Forum: C++ Development
Topic: wxStandardPaths::Get() in 8.3 format
Replies: 14
Views: 708

Re: wxStandardPaths::Get() in 8.3 format

We are using wxWigets 3.1.5 under Windows 10 and 11. For debug version we are using the binaries from the wxWidgets website, built with TDM-GCC 9.2. The release libraries (monolithic) are created by ourselves.
by Rob'
Thu Nov 10, 2022 1:34 pm
Forum: C++ Development
Topic: wxStandardPaths::Get() in 8.3 format
Replies: 14
Views: 708

wxStandardPaths::Get() in 8.3 format

I want to read an INI file, which has the same name as the executable file but with the extension INI, and is in the same directory. For this I do the following: wxFileName filename(wxStandardPaths::Get().GetExecutablePath()); filename.SetExt("ini"); The filename of my executable file is l...
by Rob'
Sun Jul 17, 2022 1:29 pm
Forum: Compiler / Linking / IDE Related
Topic: Linker Error wx3.2 + TDM-GCC 10.3
Replies: 8
Views: 1357

Re: Linker Error wx3.2 + TDM-GCC 10.3

That solves the problem, now it works. The required option is -F pe-i386. Thank you, doublemax.

@ONEEYEMAN:
Yes, there are only the versions for non-static builds available. We've been using this for some time and have never had any problems with it.

Thank you again.
by Rob'
Sun Jul 17, 2022 12:57 pm
Forum: Compiler / Linking / IDE Related
Topic: Linker Error wx3.2 + TDM-GCC 10.3
Replies: 8
Views: 1357

Re: Linker Error wx3.2 + TDM-GCC 10.3

@doublemax: This means that resource.res is a 64bit file. That was my guess. Did you tell it to create a 32bit file? And that was the question. The help shows this: windres: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf32-...
by Rob'
Sun Jul 17, 2022 9:20 am
Forum: Compiler / Linking / IDE Related
Topic: Linker Error wx3.2 + TDM-GCC 10.3
Replies: 8
Views: 1357

Re: Linker Error wx3.2 + TDM-GCC 10.3

Thanks for your replay, but I guess you can see the question mark over my head. I have downloaded and installed: - TDM-GCC 10.3 - from the wx download page the Windows binaries for TDM-GCC 10.3 (header and development files) With TDM-GCC I can build 32 and 64 bit applications. It depends on the flag...
by Rob'
Sat Jul 16, 2022 2:40 pm
Forum: Compiler / Linking / IDE Related
Topic: Linker Error wx3.2 + TDM-GCC 10.3
Replies: 8
Views: 1357

Linker Error wx3.2 + TDM-GCC 10.3

I am using TDM-GCC 10.3 and the Windows binaries. When I try to build a simple 32 bit app, I get the following error x86_64-w64-mingw32-g++.exe -Lc:\dev\wxWidgets-3.2.0\lib\gcc103TDM_dll -o bin\Debug\Test32.exe obj\Debug\GUIFrame.o obj\Debug\Test32App.o obj\Debug\Test32Main.o obj\Debug\resource.res ...