I am using Windows 10 64 bit home edition.
I am using the TDM C++ Compiler 5.1.2 for Windows.
I am using Code::Blocks 17.12.
By means of the online web documentation, or the download copy of that,
or otherwise, if I wish to link to a particular class, when doing my wxWidgets
programming, how do I know which one, or what group, of .a files I am
supposed to link to?
-Say, for example, I wish to instantiate wxFrame. I see that I need
to #include "wx/frame.h". I have found the correct copy of that file.
But I don't know which .a file(s) to link. In this example, can someone
tells me which .a files I need to link to?
-There are 44 .a files. Is the idea that I link to all of them,
or in fact not? Where in the documentation is it going to tell
me which .a file to link to? What do I do for loading other classes
by linking and instantiation when it comes to picking a particular
.a file to link to?
How do I know which one (or what group) of .a files to link to?
-
- In need of some credit
- Posts: 7
- Joined: Thu Mar 22, 2018 1:10 pm
Re: How do I know which one (or what group) of .a files to link to?
there is a programm - wx-config
it intended to provide you with specific information(names, paths, options...) for wxWidgets application building process.
did you read about it?
https://wiki.wxwidgets.org/Wx-Config
ps.
aah. sorry. it's for linux systems... but you're using the pure Windows wxWidgets port.
at least in linux there are just few libs you need to link against your app to build wxWidgets app. and a call "wx-config --libs all" will return actual their paths.
Cannot help you with Windows port of wxWIdgets.
it intended to provide you with specific information(names, paths, options...) for wxWidgets application building process.
did you read about it?
https://wiki.wxwidgets.org/Wx-Config
ps.
aah. sorry. it's for linux systems... but you're using the pure Windows wxWidgets port.
at least in linux there are just few libs you need to link against your app to build wxWidgets app. and a call "wx-config --libs all" will return actual their paths.
Cannot help you with Windows port of wxWIdgets.
Last edited by alys666 on Tue Jul 23, 2019 4:16 am, edited 1 time in total.
ubuntu 20.04, wxWidgets 3.2.1
-
- Super wx Problem Solver
- Posts: 469
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
Re: How do I know which one (or what group) of .a files to link to?
Generally, you'll always need to link with the base library. It should be named something like 'libwxbase31XX.a' where 'XX' might be some optional letters like that give more information about the build.
For additional items, you can look up which library is needed in the documentation. For example, on the Frame page, near the end of the brief description but before the list of methods, you'll see "Library: wxCore". That means you'll need to link with the core library when using members of the frame class. It should be named something like 'libwxmsw31XX_core.a'.
If you use the codeblocks wxWidgets wizard, it should set up the set up the base and core libraries for you. The wizard will give you the option of creating an empty project so that it won't create any files, but it will still set up all the include and linking information needed. Just one work of warning, it's important to match the settings used in the codeblocks wizard with the settings you used when building your version of the wxWidgets libraries. There are several posts in the Compiler / Linking / IDE Related subforum about how to do that.
For additional items, you can look up which library is needed in the documentation. For example, on the Frame page, near the end of the brief description but before the list of methods, you'll see "Library: wxCore". That means you'll need to link with the core library when using members of the frame class. It should be named something like 'libwxmsw31XX_core.a'.
If you use the codeblocks wxWidgets wizard, it should set up the set up the base and core libraries for you. The wizard will give you the option of creating an empty project so that it won't create any files, but it will still set up all the include and linking information needed. Just one work of warning, it's important to match the settings used in the codeblocks wizard with the settings you used when building your version of the wxWidgets libraries. There are several posts in the Compiler / Linking / IDE Related subforum about how to do that.
-
- Super wx Problem Solver
- Posts: 469
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
Re: How do I know which one (or what group) of .a files to link to?
wx-config currently doesn't work with the mingw family of compilers.alys666 wrote: ↑Tue Jul 23, 2019 4:05 am there is a programm - wx-config
it intended to provide you with specific information(names, paths, options...) for wxWidgets application building process.
did you read about it?
https://wiki.wxwidgets.org/Wx-Config
Re: How do I know which one (or what group) of .a files to link to?
yes.. i already corrected my answer...New Pagodi wrote: ↑Tue Jul 23, 2019 4:13 amwx-config currently doesn't work with the mingw family of compilers.alys666 wrote: ↑Tue Jul 23, 2019 4:05 am there is a programm - wx-config
it intended to provide you with specific information(names, paths, options...) for wxWidgets application building process.
did you read about it?
https://wiki.wxwidgets.org/Wx-Config
but a question - it could not work for compiler(in invocation string), but does it exist in wxWIdgets installation for Windows, if yes - it could be called in terminal and at least user can see its output and manually include it in his compiler invocation string?
I m completely fool in Windows, because am living in Linux for decade or more.
ubuntu 20.04, wxWidgets 3.2.1
Re: How do I know which one (or what group) of .a files to link to?
The documentation for each class says in which library it is, e.g. for wxFrame it says:
By that you can usually deduce which library file you need.Library: wxCore
Use the source, Luke!
-
- In need of some credit
- Posts: 7
- Joined: Thu Mar 22, 2018 1:10 pm
Re: How do I know which one (or what group) of .a files to link to?
Thank you very much.
As a Windows person, wx-config is no option for me.
I hand't noticed that classed have a Library: entry.
I was expecting something like that entry to be at the very
top of the class documentation,which is why I havn't seen it.
Thank you guys very much for the clarification.
As a Windows person, wx-config is no option for me.
I hand't noticed that classed have a Library: entry.
I was expecting something like that entry to be at the very
top of the class documentation,which is why I havn't seen it.
Thank you guys very much for the clarification.