Gecko SDK Mozilla Plugin Development - Why can´t use it on DEV C++???

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2008
Posts: 1
Reputation: ricardonho is an unknown quantity at this point 
Solved Threads: 0
ricardonho ricardonho is offline Offline
Newbie Poster

Gecko SDK Mozilla Plugin Development - Why can´t use it on DEV C++???

 
0
  #1
Sep 4th, 2008
I want to develop some plugins for Mozilla Firefox and Internet Explorer. I download de Gecko SDK from mozilla.org, but all mozilla SDK development is by default focused on Visual Studio. And i don´t have Visual Studio. So then i adapted my own version of Gecko for Dev C++ ( GCC/G++ based ) and i made some tests creating some DLLs with it. Gecko compiles well on Dev C++, and i even copied the resource.rc file from the original gecko example ( basic.rc ) to "identify" my DLL properly. The DLL is loaded ( recognized ) by Firefox, but then firefox crash down and give me a message error...

The exactly same code compiled on Visual Studio 2005 ( here in the office i work ) works fine, compiles, and is properly loaded by Firefox with no errors.

One of the problems i found was that GCC/G++ doesn´t export methods very well with __stdcall when the project is an DLL. When i use extern "C" __lalala(dllexport), the functions is exported fine. But Mozilla doesn´t "understand" this interface, find the functions but when calls them, it crashes.

Here one example of exported function that Mozilla expects to find inside a DLL

NPError __stdcall NP_Initialize(NPNetscapeFuncs* aNPNFuncs)
{ ... }

and here what i have to made on Dev C++, for that functions are properly exported:

extern "C" __declspec(dllexport) NPError NP_Initialize(NPNetscapeFuncs* aNPNFuncs)
{ ... }

I don´t know what happens, i don´t know if there is to much siginificant diferences on a compile result from Visual Studio and GCC... But the same code, compiled in Visual Studio with the original __stdcall, and the GCC code with extern "C" __declspec(dllexport), only the visual studio one works.

Is this a constant, i mean, i can only develop a plugin for Mozilla if i use Visual Studio?? Its not possible to develop the same plugin on other compilers, like G++ ( dev C++ ) or Borland C++ Builder???

Just to const here, im testing on Mozilla Firefox 3.0...

Any help will be nice!!

Thanks a lot! And sorry any english mistakes...
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 2,001
Reputation: ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of 
Solved Threads: 343
ArkM's Avatar
ArkM ArkM is offline Offline
Postaholic

Re: Gecko SDK Mozilla Plugin Development - Why can´t use it on DEV C++???

 
0
  #2
Sep 5th, 2008
I don't know the answer but may be these links help you:
http://www.nabble.com/Linking-errors...td1356421.html
http://www.geocities.com/yongweiwu/stdcall.htm
It seems you need Gecko gcc build...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC