Error: '_waccess' was not declared in this scope

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.
Lowkus
Experienced Solver
Experienced Solver
Posts: 61
Joined: Sun May 01, 2016 2:48 am

Re: Error: '_waccess' was not declared in this scope

Post by Lowkus »

Success! Thank you thank you thank you!

I changed the compiler settings in CodeBlocks so that it no longer has "g++ follow the C++11 ISO" turned on, then under "Other Compiler Options" I appended the text "-std=gnu++11".

There were a few more bugs but they were simply because I needed to link to libwxjpeg.a and libwxtiff.a. Then everything compiled fine!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Error: '_waccess' was not declared in this scope

Post by ONEEYEMAN »

Hi,
And you were able to run the program successfully?

Thank you.
Manolo
Can't get richer than this
Can't get richer than this
Posts: 827
Joined: Mon Apr 30, 2012 11:07 pm

Re: Error: '_waccess' was not declared in this scope

Post by Manolo »

wxWidgets 3.1 for Windows now needs oleacc lib.
The makefile's already have it, but you must add it to your own project.

You can also dig into wx' makefiles provided (see for example, those at Minimal or AUI or Grid samples) and find the required libraries.

This is a list I extracted myself:
kernel32
user32
gdi32
comdlg32
winspool
winmm
shell32
shlwapi
comctl32
ole32
oleaut32
uuid
rpcrt4
advapi32
version
wsock32
wininet
odbc32
opengl32
oleacc
Lowkus
Experienced Solver
Experienced Solver
Posts: 61
Joined: Sun May 01, 2016 2:48 am

Re: Error: '_waccess' was not declared in this scope

Post by Lowkus »

ONEEYEMAN wrote:Hi,
And you were able to run the program successfully?

Thank you.
Yep, it ran successfully. I have a more complicated program I'm trying to compile now that is showing errors, but the problems I'm running into now are probably from something else entirely.
Lowkus
Experienced Solver
Experienced Solver
Posts: 61
Joined: Sun May 01, 2016 2:48 am

Re: Error: '_waccess' was not declared in this scope

Post by Lowkus »

Manolo wrote:wxWidgets 3.1 for Windows now needs oleacc lib.
The makefile's already have it, but you must add it to your own project.
I just added liboleacc.a, although the program seemed to compile fine without it. Does oleacc handle something that is not caught in the compilation process?

I also noticed you have a few other libs that I didn't include; winmm, rpcrt4, wininet, and
opengl32. Are these just ones you've added for particular capabilities of your application, or are they recommended to be included in all application builds? If an application uses OpenGL does it require that the wxWidgets library be built with any special compiler arguments?
Manolo
Can't get richer than this
Can't get richer than this
Posts: 827
Joined: Mon Apr 30, 2012 11:07 pm

Re: Error: '_waccess' was not declared in this scope

Post by Manolo »

Some wx features require some libraries. If your app doesn't use these features then you don't need to link to those libraries.
I searched inside some samples to get most or all of the libraries I would use in my apps I posted them here.

Using OpenGL requires the flag USE_OPENGL=1 when compiling both wxWidgets and your app.
Post Reply