Hi,
I am compiling webconnect first. Let me explain my problem.
I have compiled latest wxWidgets (ie wxMSW-2.8.10) in g++, it is kept inside 'webconnect' folder, as per the instructions.
here is how I compiled wxWidgets again as per its build instructions...
{ this is using msys, open cmd prompt...give sh command it picks sh from msys....now start
cd C:\webconnect\wxMSW-2.8.10
mkdir build-debug
cd build-debug
../configure --with-msw --enable-debug --enable-debug_gdb --enable-unicode
make
}
compilation will succeed...now all .o are in 'build-debug' folder, libs are in 'lib' folder, there is a 'wx' folder in 'lib' folder too.
Now lets start compiling webconnect
top.mak is missing.........did not find it in dowloaded webconnect.
Edited Makefile inside webconnect... I have removed top.mak include statement
excerpts from Makefile of webconnect.....note.. I have taken few lines from Makefile of testapp too
path given to WX_CONFIG is as per wxwidgets compilation folders
-------------start-----------------
WX_DIR := C:/webconnect/wxMSW-2.8.10
WX_CONFIG := ${WX_DIR}/build-debug/lib/wx/config/inplace-msw-unicode-debug-2.8
WX_CFLAGS := $(shell ${WX_CONFIG} --prefix=${WX_DIR} --cppflags)
WX_LIBS := $(shell ${WX_CONFIG} --prefix=${WX_DIR} --libs)
INCLUDES = ../wxMSW-2.8.10/include
CPP = g++
DEFINES = ${LARGEFILE_DEFINES}
CFLAGS = ${WX_CFLAGS} -g -ggdb -fno-rtti
LIBS = ${WX_LIBS}
-------------end-----------------
rest things remain same
now open 'cmd prompt', say 'sh', it takes 'sh' from 'msys', you get $ prompt
just say 'make'
it starts but gives error
dom.cpp
g++ -I/c/webconnect/wxMSW-2.8.10/build-debug/lib/wx/include/msw-unicode-debug-2.
8 -I/c/webconnect/wxMSW-2.8.10/include -I/c/webconnect/wxMSW-2.8.10/contrib/incl
ude -D__WXDEBUG__ -DWXUSINGDLL -D__WXMSW__ -g -ggdb -fno-rtti ../wxMSW-2.8.10/in
clude -c dom.cpp
In file included from nsinclude.h:19,
from dom.cpp:14:
nsall.h:36:49: error: macro "NS_DECLARE_STATIC_IID_ACCESSOR" passed 11 arguments
, but takes just 1
Please let me know if you have any information.
Thanks
Sam
Kirix Support Forums
Not able to compile using g++ (top.mak) missing
5 posts
• Page 1 of 1
- adibarve
- Registered User
- Posts: 4
- Joined: Wed Aug 19, 2009 10:04 am
Re: Not able to compile using g++ (top.mak) missing
Hi,
I'm guessing that it has only been tested with MSVC on windows, not with GCC.
Looks like the difference could be that the GCC preprocessor supports variable argument lists in macros whereas MSVC does not (yet). This problem is coming from the definition of NS_DECLARE_STATIC_IID_ACCESSOR in nsbase.h:
You could try changing this to:
Cheers
Nigel
I'm guessing that it has only been tested with MSVC on windows, not with GCC.
Looks like the difference could be that the GCC preprocessor supports variable argument lists in macros whereas MSVC does not (yet). This problem is coming from the definition of NS_DECLARE_STATIC_IID_ACCESSOR in nsbase.h:
- Code: Select all
#ifdef WIN32
#define NS_DECLARE_STATIC_IID_ACCESSOR(iid) \
static const nsIID& GetIID() { \
static nsIID nsiid = iid; \
return nsiid; \
}
#else
#define NS_DECLARE_STATIC_IID_ACCESSOR(...) \
static const nsIID& GetIID() { \
static nsIID nsiid = __VA_ARGS__; \
return nsiid; \
}
#endif
You could try changing this to:
- Code: Select all
#ifdef __GNUC__
#define NS_DECLARE_STATIC_IID_ACCESSOR(...) \
static const nsIID& GetIID() { \
static nsIID nsiid = __VA_ARGS__; \
return nsiid; \
}
#else
#define NS_DECLARE_STATIC_IID_ACCESSOR(iid) \
static const nsIID& GetIID() { \
static nsIID nsiid = iid; \
return nsiid; \
}
#endif
Cheers
Nigel
- ngpaton
- Registered User
- Posts: 11
- Joined: Wed Aug 19, 2009 4:42 am
Re: Not able to compile using g++ (top.mak) missing
Hi Nigel,
Thanks a lot for the reply.
It gives me great pleasure to inform you that after making the changes that you suggested ...it worked, but...it has reported new error while compiling webcontrol.cpp.
---START------
g++ -I/c/webconnect/wxMSW-2.8.10/build-debug/lib/wx/include/msw-unicode-debug-2.8 -I/c/webconnect/wxMSW-2.8.10/include -I/c/webconnect/wxMSW-2.8.10/contrib/include -D__WXDEBUG__ -DWXUSINGDLL -D__WXMSW__ -g -ggdb -fno-rtti ../wxMSW-2.8.10/include -c webcontrol.cpp
webcontrol.cpp:34: warning: 'wxEVT_WEB_OPENURI' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:35: warning: 'wxEVT_WEB_TITLECHANGE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:36: warning: 'wxEVT_WEB_LOCATIONCHANGE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:37: warning: 'wxEVT_WEB_DOMCONTENTLOADED' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:38: warning: 'wxEVT_WEB_STATUSTEXT' redeclared without dllimportattribute: previous dllimport ignored
webcontrol.cpp:39: warning: 'wxEVT_WEB_STATUSCHANGE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:40: warning: 'wxEVT_WEB_STATECHANGE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:41: warning: 'wxEVT_WEB_SHOWCONTEXTMENU' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:42: warning: 'wxEVT_WEB_CREATEBROWSER' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:43: warning: 'wxEVT_WEB_LEFTDOWN' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:44: warning: 'wxEVT_WEB_MIDDLEDOWN' redeclared without dllimportattribute: previous dllimport ignored
webcontrol.cpp:45: warning: 'wxEVT_WEB_RIGHTDOWN' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:46: warning: 'wxEVT_WEB_LEFTUP' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:47: warning: 'wxEVT_WEB_MIDDLEUP' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:48: warning: 'wxEVT_WEB_RIGHTUP' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:49: warning: 'wxEVT_WEB_LEFTDCLICK' redeclared without dllimportattribute: previous dllimport ignored
webcontrol.cpp:50: warning: 'wxEVT_WEB_DRAGDROP' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:51: warning: 'wxEVT_WEB_INITDOWNLOAD' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:52: warning: 'wxEVT_WEB_SHOULDHANDLECONTENT' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:53: warning: 'wxEVT_WEB_FAVICONAVAILABLE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:54: warning: 'wxEVT_WEB_DOMEVENT' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:55: warning: 'wxWebEvent::ms_classInfo' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:55: warning: 'virtual wxClassInfo* wxWebEvent::GetClassInfo() const' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:55: warning: 'static wxObject* wxWebEvent::wxCreateObject()' redeclared without dllimport attribute after being referenced with dll linkage
webcontrol.cpp:55: error: definition of static data member 'wxWebEvent::ms_classInfo' of dllimport'd class
make: *** [webcontrol.o] Error 1
------END--------
Please let me know if you have some more information.
:~)
Thanks.
Thanks a lot for the reply.
It gives me great pleasure to inform you that after making the changes that you suggested ...it worked, but...it has reported new error while compiling webcontrol.cpp.
---START------
g++ -I/c/webconnect/wxMSW-2.8.10/build-debug/lib/wx/include/msw-unicode-debug-2.8 -I/c/webconnect/wxMSW-2.8.10/include -I/c/webconnect/wxMSW-2.8.10/contrib/include -D__WXDEBUG__ -DWXUSINGDLL -D__WXMSW__ -g -ggdb -fno-rtti ../wxMSW-2.8.10/include -c webcontrol.cpp
webcontrol.cpp:34: warning: 'wxEVT_WEB_OPENURI' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:35: warning: 'wxEVT_WEB_TITLECHANGE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:36: warning: 'wxEVT_WEB_LOCATIONCHANGE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:37: warning: 'wxEVT_WEB_DOMCONTENTLOADED' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:38: warning: 'wxEVT_WEB_STATUSTEXT' redeclared without dllimportattribute: previous dllimport ignored
webcontrol.cpp:39: warning: 'wxEVT_WEB_STATUSCHANGE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:40: warning: 'wxEVT_WEB_STATECHANGE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:41: warning: 'wxEVT_WEB_SHOWCONTEXTMENU' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:42: warning: 'wxEVT_WEB_CREATEBROWSER' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:43: warning: 'wxEVT_WEB_LEFTDOWN' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:44: warning: 'wxEVT_WEB_MIDDLEDOWN' redeclared without dllimportattribute: previous dllimport ignored
webcontrol.cpp:45: warning: 'wxEVT_WEB_RIGHTDOWN' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:46: warning: 'wxEVT_WEB_LEFTUP' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:47: warning: 'wxEVT_WEB_MIDDLEUP' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:48: warning: 'wxEVT_WEB_RIGHTUP' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:49: warning: 'wxEVT_WEB_LEFTDCLICK' redeclared without dllimportattribute: previous dllimport ignored
webcontrol.cpp:50: warning: 'wxEVT_WEB_DRAGDROP' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:51: warning: 'wxEVT_WEB_INITDOWNLOAD' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:52: warning: 'wxEVT_WEB_SHOULDHANDLECONTENT' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:53: warning: 'wxEVT_WEB_FAVICONAVAILABLE' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:54: warning: 'wxEVT_WEB_DOMEVENT' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:55: warning: 'wxWebEvent::ms_classInfo' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:55: warning: 'virtual wxClassInfo* wxWebEvent::GetClassInfo() const' redeclared without dllimport attribute: previous dllimport ignored
webcontrol.cpp:55: warning: 'static wxObject* wxWebEvent::wxCreateObject()' redeclared without dllimport attribute after being referenced with dll linkage
webcontrol.cpp:55: error: definition of static data member 'wxWebEvent::ms_classInfo' of dllimport'd class
make: *** [webcontrol.o] Error 1
------END--------
Please let me know if you have some more information.
:~)
Thanks.
- adibarve
- Registered User
- Posts: 4
- Joined: Wed Aug 19, 2009 10:04 am
- MattTurner123
- Registered User
- Posts: 1
- Joined: Mon Aug 31, 2009 9:45 am
Re: Not able to compile using g++ (top.mak) missing
Hi,
I don't think you should be using the WXUSINGDLL conditional when compiling this. If you are compiling the webconnect component into a DLL I think you need to use WXMAKINGDLL_AUI (even though it's webconnect and not AUI). If you aren't compiling it into a DLL just remove WXUSINGDLL from the command line.
I don't make webconnect or wx in general as DLLs on Windows so I could be talking rubbish
Cheers
Nigel
I don't think you should be using the WXUSINGDLL conditional when compiling this. If you are compiling the webconnect component into a DLL I think you need to use WXMAKINGDLL_AUI (even though it's webconnect and not AUI). If you aren't compiling it into a DLL just remove WXUSINGDLL from the command line.
I don't make webconnect or wx in general as DLLs on Windows so I could be talking rubbish
Cheers
Nigel
- ngpaton
- Registered User
- Posts: 11
- Joined: Wed Aug 19, 2009 4:42 am
5 posts
· Page 1 of 1
Return to wxWebConnect Patches & Modifications