Compare Revisions

Compiling The npruntime Sample Plugin in Visual Studio

Revision 331157:

Revision 331157 by gfritzsche on

Revision 331161:

Revision 331161 by gfritzsche on

Title:
Compiling The npruntime Sample Plugin in Visual Studio
Compiling The npruntime Sample Plugin in Visual Studio
Slug:
Compiling_The_npruntime_Sample_Plugin_in_Visual_Studio
Compiling_The_npruntime_Sample_Plugin_in_Visual_Studio
Tags:
"Add-ons","Plugins"
"Add-ons","Plugins"
Content:

Revision 331157
Revision 331161
n35      <li>Download the <strong>Gecko SDK</strong> (aka XULRunner n35      <li>Get the&nbsp;<strong><a href="http://code.google.com/p/
>SDK) from mozilla.org release FTP and extract it. You can downloa>npapi-sdk/" title="http://code.google.com/p/npapi-sdk/">NPAPI SDK
>d it from here: <a class="external" href="http://developer.mozill></a></strong>.
>a.org/en/docs/Gecko_SDK" rel="freelink">http://developer.mozilla. 
>org/en/docs/Gecko_SDK</a> 
n37      <li>Add the <strong>Gecko SDK include path</strong> (exampln37      <li>Add the <strong>NPAPI SDK include path</strong> (exampl
>e&nbsp;: C:\xulrunner-sdk\sdk\include) to <strong>Project Propert>e&nbsp;: C:\npapi-sdk\headers) to <strong>Project Properties|(all
>ies|(all configurations)|C++|General|Additional Include Directori> configurations)|C++|General|Additional Include Directories</stro
>es</strong>. Note: If your project is still empty, the C++&nbsp;t>ng>. Note: If your project is still empty, the C++&nbsp;tree migh
>ree might not be visible. So, add some files first.>t not be visible. So, add some files first.
n39      <li>Add the following preprocessor definitions to <strong>Pn39      <li>Add the following preprocessor definitions to <strong>P
>roject Properties|(all configurations)|C++|Preprocessor|Preproces>roject Properties|(all configurations)|C++|Preprocessor|Preproces
>sor Definitions:</strong> <strong><code>WIN32;_WINDOWS;XP_WIN32;M>sor Definitions:</strong> <strong><code>WIN32;_WINDOWS;XP_WIN32;X
>OZILLA_STRICT_API;XPCOM_GLUE;XP_WIN;_X86_;NPSIMPLE_EXPORTS</code>>P_WIN;_X86_;NPSIMPLE_EXPORTS</code></strong>
></strong> 
n64      <li>If you are using Gecko SDK v1.9 and higher, you'll probn
>ably need to add folders <strong>\plugin</strong>, <strong>\nspr< 
>/strong>, and <strong>\java</strong> as included directories (as  
>seen above, go to <strong>Project Properties|(all configurations) 
>|C++|General|Additional Include Directories</strong>). These dire 
>ctories are contained in the Gecko SDK include path that you prev 
>iously added. 
65      </li>
t68      <li>Visual C++ 2008 Express don't support C99 standard about66      <li>Visual C++ 2008 Express don't support C99 standard abou
>t <strong>int32_t</strong>, <strong>uint32_t</strong>. You have t>t <strong>int32_t</strong>, <strong>uint32_t</strong>. You have t
>o add <strong>#include "nptypes.h"</strong> in top of <strong>plu>o add <strong>#include "nptypes.h"</strong> in top of <strong>plu
>gin.h</strong> file. For <strong>xulrunner 1.9.0.1 SDK</strong>, >gin.h</strong> file.
>npapi.h file uses <strong>int32</strong>, <strong>uint32</strong> 
> which is different from <strong>int32_t</strong>, <strong>uint32 
>_t</strong> defined in <strong>nptypes.h</strong>, and it may cau 
>se problems in link stage. 
69      </li>
70      <li>For <strong>xulrunner 1.9.0.1 SDK</strong>, you may not
> find <strong>npfunctions.h</strong> in include directories. You  
>have to replace all <strong>npfunctions.h</strong> by <strong>npn 
>pp.h</strong> in <strong>#include</strong> line. 

Back to History