I'm getting this error in the CodeLite IDE on my ubuntu OS, and I'm not sure why since I've done the proper #include <wx/webrequest.h>
Documents/CodeliteProjects/LearnFrench/modifyVocabFrame.cpp:75:10: error: 'wxWebRequest' was not declared in this scope
I've gone to the wxWebRequest sample in my wxWidgets-3.2 samples folder, and tried compiling it by using make in terminal and get these errors.
webrequest.cpp:29:2: error: #error "wxUSE_WEBREQUEST must be 1 for this sample."
29 | #error "wxUSE_WEBREQUEST must be 1 for this sample."
| ^~~~~
webrequest.cpp:251:28: error: ‘wxWebRequestEvent’ has not been declared
wx-config says I have access to wxNet and all the other wxCore/Base libraries and it appears I have g++ on my system with the build-essentials, and can't seem to find msw, and the header file is in the proper spot. Does anyone know how to resolve this error?
I tried exporting the wxUSE_WEBREQUEST=1 as an environment variable in terminal, didn't seem to solve the make errors. Not sure if I need to pass a flag to the compiler in the makefile, or something else entirely. It seems weird the makefile wouldn't have the proper flag set already if that's the issue, so I'm thinking it's something else, not quite sure what.
wxUSE_XXXpreprocessor symbols are defined as 0 or 1 when building the library. Under Unix this happens when runningconfigurescript, which generates thewx/setup.hfile containing these definitions. IfwxUSE_WEBREQUESTis 0 in your case, it means that support forwxWebRequestis simply not present in your version of the library.To fix this, you need to either use the library from the system package, which should have it enabled, or build it yourself and check your
config.log(not that of unrelated libtool package) created when you runconfigureto see whether support for it was enabled or not and why if it wasn't.The most likely reason for the latter is that you don't have
libcurl-devpackage (which may also be calledlibcurl4-dev) installed. In this case you need to install it, and then rerunconfigureandmaketo build the library withwxWebRequestsupport.