I use wxWidgets to write a simple dll project(only export a UI) in MAC+Xcode, but when I compile the project, many error as below:
../include/wx/buffer.h:96: error: parse error before "wxCharBuffer"
../include/wx/buffer.h:96: error: syntax error before '{' token
../include/wx/buffer.h:96: error: parse error before ':' token
…
Could you give me some information about these error
thank you
compile error Topic is solved
can you show some code?
----------------------------------------------------------
export.h
int FunTest(int a, int b);
void OpenWnd();
export.cpp
#include <wx/wx.h>
#define EXPORT __attribute__((visibility("default")))
int EXPORT FunTest(int a, int b)
{
return a+b;
}
void EXPORT OpenWnd()
{
wxFrame* pFrame = new wxFrame(...);
pFrame->Show(...);
}
if i only export the FunTest(...), i call it by another application, and it's ok, but when i export OpenWnd(), there will appere many errors.
my code is a simple sample to export a UI for other application, but when comple first line(wx/wx.h),there will apper a lot of error,and by now, the compiler can't comile my any one line code still.
How did you build and install wxWidgets?
I didn't install wxWidgets, but i download it's code and compile successfull
Do wx samples build?
yes, the sample "minimal" comiled and run OK
How did you build your project/makefile?
my project creted by xcode, it is a dynamic link library.
----------------------------------------------------------
export.h
int FunTest(int a, int b);
void OpenWnd();
export.cpp
#include <wx/wx.h>
#define EXPORT __attribute__((visibility("default")))
int EXPORT FunTest(int a, int b)
{
return a+b;
}
void EXPORT OpenWnd()
{
wxFrame* pFrame = new wxFrame(...);
pFrame->Show(...);
}
if i only export the FunTest(...), i call it by another application, and it's ok, but when i export OpenWnd(), there will appere many errors.
my code is a simple sample to export a UI for other application, but when comple first line(wx/wx.h),there will apper a lot of error,and by now, the compiler can't comile my any one line code still.
How did you build and install wxWidgets?
I didn't install wxWidgets, but i download it's code and compile successfull
Do wx samples build?
yes, the sample "minimal" comiled and run OK
How did you build your project/makefile?
my project creted by xcode, it is a dynamic link library.
Well then how did you build itI didn't install wxWidgets, but i download it's code and compile successfull
How did you build your xcode project? I suspect you didn't build it properly. try e.g. building your library with a makefile + wx-config, if it works you know your project is incorrectmy project creted by xcode, it is a dynamic link library.
i create another dynamic project and build successfull, i don't know why? no time to find the answer.
http://blog.163.com/kevin_fly/
-----我的博客,我的知识库------
-----我的博客,我的知识库------