Solved

Creating a Netscape Plugin with Watcom

Posted on 1997-04-06
6
360 Views
Last Modified: 2013-12-27
I am having problems getting Watcom to compile the sample
NPCLOCK plugin.  It reports a syntax error at line 59 of
NPOS2.CPP (in common).

This line is a function definition, and I find it hard to
believe that there would be a syntax error in the
distributed code.  Has anyone had this problem and can shed
some light on its solution please?

I have the Warp toolkit and Watcom 10.6
0
Comment
Question by:faye040697
6 Comments
 
LVL 1

Expert Comment

by:timur
ID: 1805704
If you can post the following, I can look at the problem without
having to compile it myself:
The source for NPOS2.CPP (line 59 and the surrounding lines only)
The command-line parameters for wpp386
The exact error output of the compiler
0
 

Author Comment

by:faye040697
ID: 1805705
NPOS2.CPP:

58:NPError OSCALL NP_EXPORT
59:NP_GetEntryPoints(NPPluginFuncs* pFuncs)
60:{

error log:

wpp386 ..\..\common\npos2.cpp
-i=d:\watcom\h;d:\watcom\h\os2;d:\watcom\netscape\include -w4
-e25 -zq -otexan -d2 -bd -5r -bt=os2 -mf
..\..\common\npos2.cpp(34): Warning! W014: (col 1) no reference
to symbol 'hmod'
..\..\common\npos2.cpp(34): Note! N392: (col 1) 'unsigned long
hmod' in 'unsigned long DLLInitTerm( unsigned long, int )'
defined in: ..\..\common\npos2.cpp(31) (col 27)
..\..\common\npos2.cpp(34): Warning! W014: (col 1) no reference
to symbol 'Flag'
..\..\common\npos2.cpp(34): Note! N392: (col 1) 'int Flag' in
'unsigned long DLLInitTerm( unsigned long, int )' defined in:
..\..\common\npos2.cpp(31) (col 37)
..\..\common\npos2.cpp(59): Error! E006: (col 1) syntax error;
probable cause: missing ';'
..\..\common\npos2.cpp(254): Warning! W014: (col 1) no reference
to symbol 'g_pluginFuncs'
..\..\common\npos2.cpp(254): Note! N392: (col 1) '_NPPluginFuncs
* g_pluginFuncs' defined in: ..\..\common\npos2.cpp(48) (col 23)
Error(E42): Last command making
(d:\watcom\netscape\sample\npclock\npos2.obj) returned a bad
status

0
 

Author Comment

by:faye040697
ID: 1805706
NPOS2.CPP:

58:NPError OSCALL NP_EXPORT
59:NP_GetEntryPoints(NPPluginFuncs* pFuncs)
60:{

error log:

wpp386 ..\..\common\npos2.cpp
-i=d:\watcom\h;d:\watcom\h\os2;d:\watcom\netscape\include -w4
-e25 -zq -otexan -d2 -bd -5r -bt=os2 -mf
..\..\common\npos2.cpp(34): Warning! W014: (col 1) no reference
to symbol 'hmod'
..\..\common\npos2.cpp(34): Note! N392: (col 1) 'unsigned long
hmod' in 'unsigned long DLLInitTerm( unsigned long, int )'
defined in: ..\..\common\npos2.cpp(31) (col 27)
..\..\common\npos2.cpp(34): Warning! W014: (col 1) no reference
to symbol 'Flag'
..\..\common\npos2.cpp(34): Note! N392: (col 1) 'int Flag' in
'unsigned long DLLInitTerm( unsigned long, int )' defined in:
..\..\common\npos2.cpp(31) (col 37)
..\..\common\npos2.cpp(59): Error! E006: (col 1) syntax error;
probable cause: missing ';'
..\..\common\npos2.cpp(254): Warning! W014: (col 1) no reference
to symbol 'g_pluginFuncs'
..\..\common\npos2.cpp(254): Note! N392: (col 1) '_NPPluginFuncs
* g_pluginFuncs' defined in: ..\..\common\npos2.cpp(48) (col 23)
Error(E42): Last command making
(d:\watcom\netscape\sample\npclock\npos2.obj) returned a bad
status

0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Expert Comment

by:jaiger
ID: 1805707
maybe Julien Pierre can help you out.  He's written some plugins
for Netscape/2 though I'm not sure what compiler he is using.

try posting to c.o.o.programmer.misc, I don't have his email
or webpage handy.

good luck.
0
 
LVL 1

Expert Comment

by:timur
ID: 1805708
It looks like your missing a header file.  Have you tried
looking at the pre-processor output?  What are the definitions
of NPError and "OSCALL NP_EXPORT"?  These could be
compiler-specific flags.

0
 

Accepted Solution

by:
jlouvau earned 100 total points
ID: 1805709
NP_EXPORT is defined ad _Export... while Watcom handles most of the IBM compiler-isms, this is one it doesn't. Either change those references to __export, or add -d_Export=__export to the compiler command-line.

FYI, there's also a breakage in Clock.h:

They have:

struct CLKDATA {
   ...
};

typedef CLKDATA *PCLKDATA;

This obviously isn't kosher. It should be:

typedef struct CLKDATA *PCLKDATA;

*OR* (preferably)

typedef struct _CLKDATA {
   ...
} CLKDATA;

In which case the typedef is OK.

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question