Problems building the helloworld example

20 views
Skip to first unread message

reedb

unread,
Nov 10, 2009, 12:07:10 PM11/10/09
to nixysa-users
I built using scons and VC++6.0. After some minor changes I was able
to produce an executable: helloworld.dll

The executable seems to be about the correct size but it's missing
some exports which may be needed for the plugin to be detected by
FireFox (it sounds like other posters may have had a similar
problem):

Dump of file helloworld.dll

File Type: DLL

Summary

5000 .data
1000 .rdata
1000 .reloc
B000 .text

Verses:

Dump of file npdeploytk.dll

File Type: DLL

Section contains the following exports for NPDEPLOYTK.dll

0 characteristics
4AD1AE5C time date stamp Sun Oct 11 03:07:24 2009
0.00 version
1 ordinal base
3 number of functions
3 number of names

ordinal hint RVA name

1 0 00001008 NP_GetEntryPoints
2 1 00001091 NP_Initialize
3 2 00001255 NP_Shutdown



Which version of the MS IDE should I be using? Should I build using
the MS IDE or scons?

Thanks,
-Reed

Antoine Labour

unread,
Nov 10, 2009, 1:29:03 PM11/10/09
to nixysa...@googlegroups.com
Try using the solution. You'll probably need a more recent version of MSVC.
The scons file is broken on windows because it doesn't build the resource. I've been meaning to fix that.

Antoine

Reed Bement

unread,
Nov 10, 2009, 1:50:59 PM11/10/09
to nixysa...@googlegroups.com
I don't see a helloworld.sln file.

Alastair Patrick

unread,
Nov 10, 2009, 2:12:49 PM11/10/09
to nixysa...@googlegroups.com
That's a fair point ;). I eyeballed the code and I can't see how it exports NP_GetEntryPoints, NP_Initialize and NP_Shutdown, which is necessary on Windows. Feel free to file a bug on the issues page.

The right way to fix it:

I think it needs to incorporate a .def file with these exports, like the one in complex/complex.def. Then the linker needs a /DEF:helloworld.def added to the command line. I've never attempted that in scons.

The easy way to fix it:

Add __declspec(dllexport) to these three functions in nixysa/static_glue/npapi/main.cc. See http://msdn.microsoft.com/en-us/library/a90k134d.aspx.

Thanks

Al

Antoine Labour

unread,
Nov 10, 2009, 9:01:37 PM11/10/09
to nixysa...@googlegroups.com
On Tue, Nov 10, 2009 at 10:50 AM, Reed Bement <re...@cncr.dreamhosters.com> wrote:
I don't see a helloworld.sln file.

Sorry about that, the complex sample has one.
Those samples need fixin'

Antoine
Reply all
Reply to author
Forward
0 new messages