MAC下写的DLL编译出错:error: parse error before 'wxC Topic is solved
MAC下写的DLL编译出错:error: parse error before 'wxC
请高手指点下面错误是因为什么引起的?
../wx/buffer.h:96: error: parse error before "wxCharBuffer"
../wx/buffer.h:96: error: syntax error before '{' token
...
../wx/buffer.h:96: error: parse error before "wxCharBuffer"
../wx/buffer.h:96: error: syntax error before '{' token
...
请楼主提供更多的信息。
你是在Mac下编译xWidgets库的时候遇到这样的问题?你需要给出你做了什么,你的源代码,你的IDE,等等。就这么一丁点信息,谁都没有办法弄清楚是怎么回事。
你是在Mac下编译xWidgets库的时候遇到这样的问题?你需要给出你做了什么,你的源代码,你的IDE,等等。就这么一丁点信息,谁都没有办法弄清楚是怎么回事。
In fascination of creating worlds by words, and in pursuit of words behind the world.
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
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.
是wxWidgets2.8.7吗?
错误信息的其余部分?没有什么什么not declared?
你是用configure编译wxWidgets的吗?你加了什么选项?Mac OS版本?XCode版本?
你同时也发了英文的帖子吗?能给出链接吗?
我在Mac下面一般都是用Makefile的,没试过XCode的工程...
-Utensil
错误信息的其余部分?没有什么什么not declared?
你是用configure编译wxWidgets的吗?你加了什么选项?Mac OS版本?XCode版本?
你同时也发了英文的帖子吗?能给出链接吗?
我在Mac下面一般都是用Makefile的,没试过XCode的工程...
-Utensil
In fascination of creating worlds by words, and in pursuit of words behind the world.
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
我印象中把wxWidgets写的程序导出到Dll经常出问题,在这个论坛里我看到过不止10篇问这种问题的帖子。
一般这种问题的产生,甚至不需要你做任何事,只需要#include <wx/wx.h>就足以导致一堆问题了。
你试着在论坛里搜索一下吧~应该有帖子已经有解答的~我还没试过把wxWidgets写的程序导出到Dll~
-Utensil
一般这种问题的产生,甚至不需要你做任何事,只需要#include <wx/wx.h>就足以导致一堆问题了。
你试着在论坛里搜索一下吧~应该有帖子已经有解答的~我还没试过把wxWidgets写的程序导出到Dll~
-Utensil
In fascination of creating worlds by words, and in pursuit of words behind the world.
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/
On Github: http://utensil.github.com
Technical Blog in Chinese: http://utensil.iteye.com/