473,804 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error: expected ')' before '*' token -- What is this ?

I am trying to write a simple libspf2 plugin code for my postfix
( milter)
I am getting this unhelpful error message when I try to compile

gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c
In file included from mfunc.c:1:
mfunc.c:42: error: expected ')' before '*' token
make: *** [mfunc.o] Error 1

my mfunc.c has on the line 42
-----------------------
.. . . . .
SPF_result_t spfcheck_s(SPF_ request_t *ecm_spf_reques t, char* ip,
char* helo, char* sender) {
SPF_response_t *spf_response = NULL;
SPF_result_t t;
SPF_request_set _ipv4_str( ecm_spf_request , ip );
SPF_request_set _helo_dom( ecm_spf_request , helo );
SPF_request_set _env_from( ecm_spf_request , sender );
SPF_request_que ry_mailfrom(ecm _spf_request, &spf_respons e);
t = SPF_response_re sult(spf_respon se);
SPF_response_fr ee(spf_response );
return t;
}

.. . . . .


So what could be the error ?
Thanks
Ram

PS:
Note to Spammers: Go ahead , send me spam
ra*@netcore.co. in
http://ecm.netcore.co.in/spamtrap.html

Jul 31 '07
21 35545
>
We still need the definitions for all the SPF_*_t types, particularly,
SPF_result_t and SPF_request_t.
But these are standard header files
I got one file url here
http://csourcesearch.net/package/lib.../include/spf.h

Thanks
Ram

Jul 31 '07 #11
Ram Prasad wrote:
>>We still need the definitions for all the SPF_*_t types, particularly,
SPF_result_ t and SPF_request_t.


But these are standard header files
No - they are part of a specific package. Nothing standard about them as
far as the C language goes.

I do wonder whether you'd get better help about developing with this
package by posting to a forum specifically for it, rather than a general
C newsgroup. Looking here <http://www.libspf2.org/support.htmlsug gests
some possibilities.
Jul 31 '07 #12
On Jul 31, 7:33 pm, Mark Bluemel <mark_blue...@p obox.comwrote:
Ram Prasad wrote:
>We still need the definitions for all the SPF_*_t types, particularly,
SPF_result_t and SPF_request_t.
But these are standard header files

No - they are part of a specific package. Nothing standard about them as
far as the C language goes.

I do wonder whether you'd get better help about developing with this
package by posting to a forum specifically for it, rather than a general
C newsgroup. Looking here <http://www.libspf2.org/support.htmlsug gests
some possibilities.
But that is not a group of programmers. I simply wanted to know what
this error means
error: expected ')' before '*' token

Definetly it loooks like a syntax error , but there is absolutely no
error on that line
If I comment out the entire function and its declaration , then I dont
get this error. I just declare this function , without even defining
the code for it and gcc gives me this stupid error


Jul 31 '07 #13
Ram Prasad wrote:
On Jul 31, 7:33 pm, Mark Bluemel <mark_blue...@p obox.comwrote:
>Ram Prasad wrote:
>>We still need the definitions for all the SPF_*_t types, particularly,
SPF_result_ t and SPF_request_t.
But these are standard header files

No - they are part of a specific package. Nothing standard about them as
far as the C language goes.

I do wonder whether you'd get better help about developing with this
package by posting to a forum specifically for it, rather than a general
C newsgroup. Looking here <http://www.libspf2.org/support.htmlsug gests
some possibilities.

But that is not a group of programmers. I simply wanted to know what
this error means
error: expected ')' before '*' token

Definetly it loooks like a syntax error , but there is absolutely no
error on that line
If I comment out the entire function and its declaration , then I dont
get this error. I just declare this function , without even defining
the code for it and gcc gives me this stupid error
Find out the definition for all the SPF_*_types in the function declaration
and definition. What do they resolve into? Do you compile in ISO C
conforming mode or in someother mode? Is the code GNU C specific? If not,
try compiling with another compiler like Intel' or MSVC.

It's highly unlikely to a gcc bug. There must be some syntax error in your
code and header files. Try to compile a minimal program that still exhibits
the error. You can do that by leaving out stuff that are not absolutely
necessary for successful compilation or for exhibiting the error.

Jul 31 '07 #14
Ram Prasad wrote:
On Jul 31, 7:33 pm, Mark Bluemel <mark_blue...@p obox.comwrote:
>>Ram Prasad wrote:
>>>>We still need the definitions for all the SPF_*_t types, particularly,
SPF_result_ t and SPF_request_t.
>>>But these are standard header files

No - they are part of a specific package. Nothing standard about them as
far as the C language goes.

I do wonder whether you'd get better help about developing with this
package by posting to a forum specifically for it, rather than a general
C newsgroup. Looking here <http://www.libspf2.org/support.htmlsug gests
some possibilities.


But that is not a group of programmers.
It very like is, and it's probably a group of people who have developed
with this library and these header files. But if you don't want my
advice it hasn't cost you anything.
I simply wanted to know what
this error means
error: expected ')' before '*' token
It means the compiler expected something in parentheses to have been
completed, and the closing parenthesis supplied, before a '*' on line 42.
Definetly it loooks like a syntax error , but there is absolutely no
error on that line
Have you examined the code which the compiler is compiling?

I suggest you run the gcc compiler with whatever option will show you
the results of the precompiler - perhaps "-E". Examine that code and
work backwards.
Jul 31 '07 #15
On Tue, 31 Jul 2007 03:31:47 -0700, Ram Prasad
<ra**********@g mail.comwrote:
>I am trying to write a simple libspf2 plugin code for my postfix
( milter)
I am getting this unhelpful error message when I try to compile

gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c
In file included from mfunc.c:1:
mfunc.c:42: error: expected ')' before '*' token
make: *** [mfunc.o] Error 1

my mfunc.c has on the line 42
-----------------------
. . . . .
SPF_result_t spfcheck_s(SPF_ request_t *ecm_spf_reques t, char* ip,
char* helo, char* sender) {
We still don't have enough information, but making some assumptions
and wild guesses, I suspect that the compiler is not recognizing
"SPF_request_t" . Check it's definition, make sure the definition is
visible to the code with the error, and make sure you spelled
everything correctly. Do the same for all the strange types being
used.

--
Al Balmer
Sun City, AZ
Jul 31 '07 #16
In article <11************ **********@d30g 2000prg.googleg roups.com>,
Ram Prasad <ra**********@g mail.comwrote:
>gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c
In file included from mfunc.c:1:
mfunc.c:42: error: expected ')' before '*' token
That is a very strange error message. If the files you have posted
are right, mfunc.c is not included in mfunc.c at line 1. Have you
omitted part of the error message? Or do you have a file mdef.h that
contains preprocessor output from some version of mfunc.c (perhaps
in /usr/local/include/spf2)? Check that the files all contain what
you expect them to.

-- Richard
--
"Considerat ion shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Jul 31 '07 #17
On Jul 31, 6:31 am, Ram Prasad <ramprasad...@g mail.comwrote:
I am trying to write a simple libspf2 plugin code for my postfix
( milter)
I am getting this unhelpful error message when I try to compile

gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c
In file included from mfunc.c:1:
mfunc.c:42: error: expected ')' before '*' token
make: *** [mfunc.o] Error 1


I usually get this error when I mess up syntax (e.g. miss
a semicolon) or a header file has not been included properly.
Looks like things like SPF_request_t are not being recognized.
Make sure that the SPF.h (or whatever) files are included
and found (a message like "file SPF.h not found" is easy
to miss).

- William Hughes
>
my mfunc.c has on the line 42
-----------------------
. . . . .
SPF_result_t spfcheck_s(SPF_ request_t *ecm_spf_reques t, char* ip,
char* helo, char* sender) {
SPF_response_t *spf_response = NULL;
SPF_result_t t;
SPF_request_set _ipv4_str( ecm_spf_request , ip );
SPF_request_set _helo_dom( ecm_spf_request , helo );
SPF_request_set _env_from( ecm_spf_request , sender );
SPF_request_que ry_mailfrom(ecm _spf_request, &spf_respons e);
t = SPF_response_re sult(spf_respon se);
SPF_response_fr ee(spf_response );
return t;

}

. . . . .

So what could be the error ?

Thanks
Ram

PS:
Note to Spammers: Go ahead , send me spam
r...@netcore.co .inhttp://ecm.netcore.co. in/spamtrap.html

Jul 31 '07 #18
Al Balmer wrote:
On Tue, 31 Jul 2007 03:31:47 -0700, Ram Prasad
<ra**********@g mail.comwrote:
>I am trying to write a simple libspf2 plugin code for my postfix
( milter)
I am getting this unhelpful error message when I try to compile

gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c
In file included from mfunc.c:1:
mfunc.c:42: error: expected ')' before '*' token
make: *** [mfunc.o] Error 1

my mfunc.c has on the line 42
-----------------------
. . . . .
SPF_result_t spfcheck_s(SPF_ request_t *ecm_spf_reques t, char* ip,
char* helo, char* sender) {

We still don't have enough information, but making some assumptions
and wild guesses, I suspect that the compiler is not recognizing
"SPF_request_t" . Check it's definition, make sure the definition is
visible to the code with the error, and make sure you spelled
everything correctly. Do the same for all the strange types being
used.
I thought about the same problem but then, I saw that in that case it
wouldn't have recognized "SPF_result " either...

and canceled my post.

Jul 31 '07 #19
On Jul 31, 5:31 am, Ram Prasad <ramprasad...@g mail.comwrote:
I am trying to write a simple libspf2 plugin code for my postfix
( milter)
I am getting this unhelpful error message when I try to compile

gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c
In file included from mfunc.c:1:
mfunc.c:42: error: expected ')' before '*' token
make: *** [mfunc.o] Error 1

my mfunc.c has on the line 42
-----------------------
. . . . .
SPF_result_t spfcheck_s(SPF_ request_t *ecm_spf_reques t, char* ip,
char* helo, char* sender) {
[snip]

Based on what you've posted here, SPF_request_t has not been properly
defined at this point; either you haven't #included the right header
file, or the header file has a syntax error in it.

Jul 31 '07 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5692
by: cranium.2003 | last post by:
hi, Here is my code #include <iostream.h> int main() { cout <<"HI"; return 0; } and using following command to compile a C++ program g++ ex1.cpp -o ex1
4
2118
by: Gary Wessle | last post by:
Hi I have been trying to find out the reason for this error for an 1hr, please look at it for me. thanks **************** error **************** $ make; ./proj g++ -gdwarf-2 -c -o gen_data.o gen_data.cpp
9
9572
by: Trent | last post by:
Here is the error while using Visual Studio 2005 Error 1 error LNK2019: unresolved external symbol "void __cdecl print(int,int,int,int,int,int,int,int)" (?print@@YAXHHHHHHHH@Z) referenced in function _main assign2.obj Thanks a lot ! Here is the code:
4
10201
by: nickyeng | last post by:
i calling this piece of java code in jsp : List<Customer> list = Customer.listby_page(currentRs); ... ... then it gives me the following error:
2
3100
by: brasewel | last post by:
Hi guys, I'm getting an error i cannot figure. Here is my code Header file ------------------------------------------------------------------------------------------- #ifndef Clock_H #define Clock_H #include <vector> #include <list>
5
7979
by: amitmool | last post by:
hi, i have used the queue library file and try to use the template as template <class QueueItem> queue <QueueItem>::~queue() // line 25 { } template <class QueueItem> void queue<QueueItem>::push(const QueueItem& entry) // line 42
1
2821
by: BSand0764 | last post by:
I'm getting an error that I can't seem to resolve. When I compile the Functor related logic in a test program, the files compile and execute properly (see Listing #1). However, when I incorporate the same logic within my simulation, the class that implements the functor logic has problems compiling. I get the following errors: -- Building myTest.cpp --
2
1873
by: Latina | last post by:
Hi, I am doing a program using overloded operators but I am getting some error, Can some one help please. Here is my code: #include<iostream> #include<string.h> #include<cctype> using namespace std;
2
8171
by: kya2 | last post by:
I am not able to create following store procedure. CREATE PROCEDURE DBSAMBA.InsertDeleteBatch(OUT norows INT ) RESULT SETS 1 LANGUAGE SQL BEGIN part1 DECLARE TOTAL_LEFT INT DEFAULT 0; SELECT COUNT(*)INTO TOTAL_LEFT FROM DBSAMBA.REPORTEDTRANSACTION_S; WHILE (TOTAL_LEFT > 0) DO
6
14731
by: samsneelam | last post by:
Hi.. This is samuel, while doing a program, i encountered this problem.. Let me give you clarity regarding my prob.. I am having two files .. one is mpcplib.h it contains the follwing declerations.... #include <queue> #include <vector> #include <string> class database { queue<delayTP> delayThrouput;
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10351
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.