hi all,
anyone successfully compiled wxwebconnect with MinGw, be it dll or static? I have not enough knowledge in C++ and MinGw, but i guess it should be doable?
to Kirix or anyone who wants to try it, it's very easy to install MinGw:
download and install in C:\MinGw
add env vars: PATH = C:\MinGW\bin;
create a makefile.gcc
open a command prompt:
mingw32-make -f makefile.gcc > errorlog.txt 2>&1
Kirix Support Forums
MinGW
10 posts
• Page 1 of 1
Re: MinGW
I cannot see this is useful.
Would you elaborate how you got it working with MinGW?
Would you elaborate how you got it working with MinGW?
- evstevemd
- Registered User
- Posts: 5
- Joined: Sun Jan 24, 2010 9:38 am
Re: MinGW
I think you misread my post. I am asking if someone successfully built wxWebConnect for MinGw. I read somewhere that kirix people do not use MinGw and to encourage them trying it, i gave a quick installation how-to. From what i have read, nobody successfully used wxWebConnect with MinGw so far...
- psc
- Registered User
- Posts: 5
- Joined: Wed Jul 14, 2010 7:32 am
Re: MinGW
That's exactly what I want to do too.
Can somebody tell how to compile wxWebConnect whit mingw, I need to work with CodeBlocks.
Thanks.
Can somebody tell how to compile wxWebConnect whit mingw, I need to work with CodeBlocks.
Thanks.
- garrizano
- Registered User
- Posts: 4
- Joined: Mon Oct 11, 2010 6:36 pm
Re: MinGW
I successfully built the wxWebConnect to static lib.
The solution:
nsbase.h, line 239:
The NS_DECLARE_STATIC_IID_ACCESSOR(iid) macro is not suitable for gcc.
But, the built lib is wrong.
The GeckoEngine::Init() function crash at runtime at this line: (the problem is same as viewtopic.php?f=25&t=829&start=0&st=0&sk=t&sd=a )
The nsCreateInstance is not return, because it's crashing during the return.
The LOG before the "return res;" line is shown, but the LOG after the "m_appshell = nsCreateInstance(appshell_cid);" line is not.
Explanation:
I compile with mingw with gcc-3.4, gcc-4.5.0-1, gcc-tdm-4.5.1, gcc-tdm-4.5.1-dw2, but all of them is crashing at the same line.
(with Code::Blocks)
I don't understand why.
Thanks for help.
The solution:
nsbase.h, line 239:
- Code: Select all
#if (defined WIN32 && not defined __GNUWIN32__)
#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
The NS_DECLARE_STATIC_IID_ACCESSOR(iid) macro is not suitable for gcc.
But, the built lib is wrong.
The GeckoEngine::Init() function crash at runtime at this line: (the problem is same as viewtopic.php?f=25&t=829&start=0&st=0&sk=t&sd=a )
- Code: Select all
LOG;
m_appshell = nsCreateInstance(appshell_cid);
LOG;
The nsCreateInstance is not return, because it's crashing during the return.
- Code: Select all
ns_smartptr<nsISupports> nsCreateInstance(const nsCID& cid)
{
ns_smartptr<nsISupports> res;
static nsIID nsISupportsIID = NS_ISUPPORTS_IID;
ns_smartptr<nsIComponentManager> comp_mgr;
NS_GetComponentManager(&comp_mgr.p);
if (comp_mgr)
{
comp_mgr->CreateInstance(cid,
0,
nsISupportsIID,
(void**)&res.p);
}
LOG;
return res;
}
The LOG before the "return res;" line is shown, but the LOG after the "m_appshell = nsCreateInstance(appshell_cid);" line is not.
Explanation:
- Code: Select all
#define LOG printf("line: %i\n",__LINE__);
I compile with mingw with gcc-3.4, gcc-4.5.0-1, gcc-tdm-4.5.1, gcc-tdm-4.5.1-dw2, but all of them is crashing at the same line.
(with Code::Blocks)
I don't understand why.
Thanks for help.
- spell
- Registered User
- Posts: 1
- Joined: Wed Nov 03, 2010 9:15 am
Re: MinGW
As the answer is in the post you link to, I would expect this to be an alignment issue. XULRunner will have been built with MSVC++, so the alignment in a version of WebConnect built with MSVC++ should be the same. On the other hand, there is no guarantee that the alignment in MinGW will be the same as the MSVC++ alignment (if you built XULRunner itself with MinGW you might have a better chance of it working, but I have no idea of whether doing this would be easy or hard).
- jonmmorgan
- Registered User
- Posts: 94
- Joined: Fri May 14, 2010 9:48 am
Re: MinGW
..same problem with macros trying to cross compile under Linux for Windows.
Does recompiling xulrunner with mingw solve the issue ?
Anyone managed to do it ?
Does recompiling xulrunner with mingw solve the issue ?
Anyone managed to do it ?
- gabdab
- Registered User
- Posts: 2
- Joined: Thu Feb 24, 2011 7:44 am
Re: MinGW
MinGW is a tier 3 platform for Mozilla (https://developer.mozilla.org/en/Suppor ... igurations). What this means is that there is someone who tries to keep it working, but it's not guaranteed to work at any time. It also notes that "some features are disabled because they require MS COM or the w32api project doesn't expose the necessary Windows APIs". It doesn't elaborate on which features these are, so I don't know whether they would affect wxWebConnect working. Nor do I know if 1.9.2 is one of the versions where a MinGW compile would work.
I think it is better to just use MSVC++. It is the standard C++ compiler on the platform, which is why it is used in the official builds of Python, Mozilla and other prominent open source software. There is no problem developing free software with it (seeing as I use both Python and the standard wxWebConnect with XULRunner, I do it).
I think it is better to just use MSVC++. It is the standard C++ compiler on the platform, which is why it is used in the official builds of Python, Mozilla and other prominent open source software. There is no problem developing free software with it (seeing as I use both Python and the standard wxWebConnect with XULRunner, I do it).
- jonmmorgan
- Registered User
- Posts: 94
- Joined: Fri May 14, 2010 9:48 am
Re: MinGW
MSVC++ fine.
I need a Linux port though
I need a Linux port though
- gabdab
- Registered User
- Posts: 2
- Joined: Thu Feb 24, 2011 7:44 am
Re: MinGW
wxWebConnect works with gcc on Linux, and gcc/x86 is a tier 1 platform for Linux. I've had no trouble running wxWebConnect on Linux. I'm not sure why would need MinGW on Windows, that's all.
- jonmmorgan
- Registered User
- Posts: 94
- Joined: Fri May 14, 2010 9:48 am
10 posts
· Page 1 of 1
Return to wxWebConnect Questions, Thoughts & Feedback