compile error Topic is 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.
Post Reply
kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am
Contact:

compile error

Post by kevin_fly » Thu Jun 12, 2008 1:29 am

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

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Thu Jun 12, 2008 7:38 pm

can you show some code? How did you build and install wxWidgets? Do wx samples build? How did you build your project/makefile?

kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am
Contact:

Post by kevin_fly » Fri Jun 13, 2008 2:05 am

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.

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Fri Jun 13, 2008 11:20 pm

I didn't install wxWidgets, but i download it's code and compile successfull
Well then how did you build it
my project creted by xcode, it is a dynamic link library.
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 incorrect

kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am
Contact:

Post by kevin_fly » Tue Jul 01, 2008 5:18 am

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/
-----我的博客,我的知识库------

Post Reply