my program compiled error on wx/buffer.h  [SOLVED]

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.
Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

my program compiled error on wx/buffer.h

Postby Ellan » Mon Nov 13, 2017 9:44 am

Hi,
My wx program runs well under Windows and is currently being ported to MacOs, and the MacOs version is 10.12, IDE: XCode, but when compiled under the Mac, it is incorrectly reported in wx/buffer
Attachments
Buffer1.png
Buffer1.png (37.06 KiB) Viewed 145 times
Buffer4.png
Thanks

Best Regards

Ellan

Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

Re: my program compiled error on wx/buffer.h

Postby Ellan » Mon Nov 13, 2017 2:56 pm

Doesn't anyone use wx on MacOs?
Thanks

Best Regards

Ellan

User avatar
doublemax
Moderator
Moderator
Posts: 11472
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: my program compiled error on wx/buffer.h

Postby doublemax » Mon Nov 13, 2017 5:16 pm

Doesn't anyone use wx on MacOs?
Very few people in this forum work under OS X. I can only think of 2 or 3. I'm not one of them.

Building the wx libraries worked ok?
Which command line did you use?
Can you build the "minimal" sample that comes with wxWidgets?

My best guess is that the include directories are wrong and you're including the wrong version of setup.h
Or some preprocessor symbols are wrong/missing.

Unfortunately i can't be more specific.
Use the source, Luke!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 1996
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: my program compiled error on wx/buffer.h

Postby ONEEYEMAN » Mon Nov 13, 2017 8:46 pm

Hi,
Did you follow instructions in the wxWiki on setting up the Xcode for wxWidgets project?
What are the output of "wx-config --include" and "wx-config --libs"?
Did you correctly transferred those options inside the Xcode?

Thank you.

Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

Re: my program compiled error on wx/buffer.h

Postby Ellan » Tue Nov 14, 2017 1:28 am

ONEEYEMAN wrote:Hi,
Did you follow instructions in the wxWiki on setting up the Xcode for wxWidgets project?
What are the output of "wx-config --include" and "wx-config --libs"?
Did you correctly transferred those options inside the Xcode?

Thank you.


Thank you for reminding me that I followed the configuration on the wiki and configured the 'minimal' sample before I started porting my own program.

First,the "minimal" sample run ok,and the other xcode project I created using the source code of 'minimal' is working properly.

The following is the output of wx-config:
$ wx-config --libs
-L/usr/local/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -lwx_osx_cocoau_xrc-3.1 -lwx_osx_cocoau_html-3.1 -lwx_osx_cocoau_qa-3.1 -lwx_osx_cocoau_adv-3.1 -lwx_osx_cocoau_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1

wx-config --cxxflags
-I/usr/local/lib/wx/include/osx_cocoa-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__

These drawings are a screenshot of my xcode project c++flags and header files.
C++Flags.png
C++Flags.png (75.06 KiB) Viewed 104 times

HeaderPath.png

LIBPATH.png

I really don't know what the problem is?
Thanks

Best Regards

Ellan

Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

Re: my program compiled error on wx/buffer.h

Postby Ellan » Tue Nov 14, 2017 1:31 am

ONEEYEMAN wrote:Hi,
Did you follow instructions in the wxWiki on setting up the Xcode for wxWidgets project?
What are the output of "wx-config --include" and "wx-config --libs"?
Did you correctly transferred those options inside the Xcode?

Thank you.

the anther screenshot
LibPath1.png
LibPath1.png (40.74 KiB) Viewed 104 times

DefinedSetup.png
DefinedSetup.png (69.78 KiB) Viewed 104 times
Thanks

Best Regards

Ellan

Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

Re: my program compiled error on wx/buffer.h

Postby Ellan » Tue Nov 14, 2017 2:02 am

doublemax wrote:
Doesn't anyone use wx on MacOs?
Very few people in this forum work under OS X. I can only think of 2 or 3. I'm not one of them.

Building the wx libraries worked ok?
Which command line did you use?
Can you build the "minimal" sample that comes with wxWidgets?

My best guess is that the include directories are wrong and you're including the wrong version of setup.h
Or some preprocessor symbols are wrong/missing.

Unfortunately i can't be more specific.

thank you very much doublemax!
I used a wrong setup.h
and thanks ONEEYEMAN!
I was so careless.
Thanks

Best Regards

Ellan

Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

Re: my program compiled error on wx/buffer.h

Postby Ellan » Tue Nov 14, 2017 2:55 am

Ellan wrote:
doublemax wrote:
Doesn't anyone use wx on MacOs?
Very few people in this forum work under OS X. I can only think of 2 or 3. I'm not one of them.

Building the wx libraries worked ok?
Which command line did you use?
Can you build the "minimal" sample that comes with wxWidgets?

My best guess is that the include directories are wrong and you're including the wrong version of setup.h
Or some preprocessor symbols are wrong/missing.

Unfortunately i can't be more specific.

thank you very much doublemax!
I used a wrong setup.h
and thanks ONEEYEMAN!
I was so careless.

Proved my setup. H into wxWiKi in $(WXROOT)/build/osx/setup/cocoa/include Settings before there are still those errors
Thanks

Best Regards

Ellan

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 1996
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: my program compiled error on wx/buffer.h

Postby ONEEYEMAN » Tue Nov 14, 2017 4:04 am

Hi,
So they are gone now?

Thank you.

Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

Re: my program compiled error on wx/buffer.h

Postby Ellan » Tue Nov 14, 2017 6:52 am

ONEEYEMAN wrote:Hi,
So they are gone now?

Thank you.

No!
Perhaps the definition and the declaration of the template class are not in the same file, but the namespace error is not understood.
I've set it up again on wxWiki, but again, the errors are in the wx/buffer.h file!
error3.png
error3.png (77.39 KiB) Viewed 75 times

error2.png
error2.png (46.31 KiB) Viewed 75 times

error.png
Thanks

Best Regards

Ellan

User avatar
doublemax
Moderator
Moderator
Posts: 11472
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: my program compiled error on wx/buffer.h

Postby doublemax » Tue Nov 14, 2017 7:01 am

Building the wx libraries worked ok?
Which command line did you use?
Can you build the "minimal" sample that comes with wxWidgets?


In the preprocessor definitions i see something that begins with "WXBUILDING...". That looks wrong. What's the complete entry?
Use the source, Luke!

Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

Re: my program compiled error on wx/buffer.h

Postby Ellan » Tue Nov 14, 2017 7:34 am

doublemax wrote:
Building the wx libraries worked ok?
Which command line did you use?
Can you build the "minimal" sample that comes with wxWidgets?


In the preprocessor definitions i see something that begins with "WXBUILDING...". That looks wrong. What's the complete entry?

WX20171114-153203.png
Thanks

Best Regards

Ellan

User avatar
doublemax
Moderator
Moderator
Posts: 11472
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: my program compiled error on wx/buffer.h

Postby doublemax » Tue Nov 14, 2017 8:05 am

WXBUILDING should only be defined if you're compiling the wx libraries themselves. Not when you're building an application that uses wxWidgets.
Use the source, Luke!

Ellan
Experienced Solver
Experienced Solver
Posts: 55
Joined: Mon May 15, 2017 10:11 am

Re: my program compiled error on wx/buffer.h  [SOLVED]

Postby Ellan » Tue Nov 14, 2017 8:59 am

doublemax wrote:WXBUILDING should only be defined if you're compiling the wx libraries themselves. Not when you're building an application that uses wxWidgets.

Thank you !
Now I don't have that error. I haven't changed anything. It's amazing.
Thanks

Best Regards

Ellan

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 1996
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: my program compiled error on wx/buffer.h

Postby ONEEYEMAN » Tue Nov 14, 2017 3:15 pm

Hi,
Just verify that application can be started and closed successfully. ;-)

Thank you.


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests