473,803 Members | 3,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Complier error!! error C2059: syntax error : '('

I'm trying to do some basic socket programming.

here is the line of code which is creating problem..

int FAR PASCAL __declspec (dllexport)(cha r * addr,int port)

Hers is the error I'm getting..

error C2059: syntax error : '('

Any help is appreciated..

Balaji
Jul 22 '05 #1
3 5530

"Balaji" <ba****@email.a rizona.edu> wrote in message
news:49******** *************** ***@posting.goo gle.com...
I'm trying to do some basic socket programming.

here is the line of code which is creating problem..

int FAR PASCAL __declspec (dllexport)(cha r * addr,int port)

Hers is the error I'm getting..

error C2059: syntax error : '('

Any help is appreciated..

Balaji


Well, it would be hard for me to know what's wrong without knowing what FAR,
PASCAL and __declspec are. I'd guess they're macros, but what they expand
to is unkown. This appears to be Windows stuff (and possibly OLD windows
stuff, given the FAR specifier), so you might ask in a windows newsgroup.
(Also, shouldn't there be a semi-colon at the end of that line?)

-Howard
Jul 22 '05 #2
Balaji wrote:
I'm trying to do some basic socket programming.

here is the line of code which is creating problem..

int FAR PASCAL __declspec (dllexport)(cha r * addr,int port)

There's no name for the function here. Should be a function
name between the first ) and the following (
Jul 22 '05 #3
"Balaji" <ba****@email.a rizona.edu> wrote in message
news:49******** *************** ***@posting.goo gle.com...
I'm trying to do some basic socket programming.

here is the line of code which is creating problem..

int FAR PASCAL __declspec (dllexport)(cha r * addr,int port)

Hers is the error I'm getting..

error C2059: syntax error : '('

Any help is appreciated..

Balaji


Is this a function declaration? If yes, where is the name of the function ?

Rade
Jul 22 '05 #4

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

Similar topics

0
2098
by: Mike Thomas | last post by:
This one must be very simple. I am trying to run an SQL Serv 7.0 stored proc from a VBA module in an Access 2000 app. This stored proc runs fine when I remove the parameters from the stored proc and from the CommandText string below, but when I run it as is I get the error SQL Serv Syntax Error or Access Violation on the "Execute" line. _ContactFetchLike 'Thom%' also works when I run it from the Query Analyser.
3
2502
by: Nathan Sokalski | last post by:
When trying to submit data to an Access database using ASP.NET I recieve the following error: System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92
5
4522
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by including the -q64 option in xlC compiler. And we are able to link all these libraries to one of the main applications and generate an executable. SKLoader. But, when we try to run this main executable, we are getting the following errors:
3
17427
by: mandogon | last post by:
Hello peoples i am having trouble compiling this program getting a the error is "Declaration Syntax error" using borland c++ bulider v.6 if any one can help thanks void __fastcall TFrame2::FrameClick(TObject *Sender) { int main() { //it is showing the error right here ifstream myfile("c:\fileopen.txt");
3
3444
by: Maciek | last post by:
All, I'm having a problem building a library (VMime) with Visual .NET 2003. It's including, among others, gnutls.h from the GNU TLS library and I'm getting syntax errors in that file. For example this line: typedef ssize_t (*gnutls_pull_func) (gnutls_transport_ptr_t, void *, size_t);
2
4816
by: technocraze | last post by:
Hi guys, I have encountered this error when updating the values to the MS Acess table. Error : Update on linked table failed. ODBC sql server error Timeout expired. MS Acess is my front end and sql server is my backend server. This error occured whenever i step through and when it reaches rs.update it jux hangs down there and thereafter it shwn the aforementioned error. I am using the RecordSet properties to add the values. Can I use...
9
5845
by: sudhanshu | last post by:
Hi friends, I am facing this error in my vb 6.0 code. The code is... Dim conn As New ADODB.Connection Dim cmd As New ADODB.Command Private Sub cmdOK_Click()
3
13459
by: Chrizo | last post by:
Hi, I am new to C++ and I cannot seem to figure out what is wrong with my code. It looks fine to me but when I try to create an object of class Location I get this error which I do not understand the meaning to. Could someone please help me explain this problem? Thank you Chris #include<stdio.h>
2
6199
by: rahul more | last post by:
Hiiii I am making my project in VB6.0 and my back end is Access 2003. I hav one problem..... When I going to save data into database, at at cmdSave_Click event, VB giving me error(Error mentioned at heading)after clicking on SAVE button and Highlighting the statement which are as follows..... rs.Open "Insert into addclasses (Batch, BatchTime, Std, CollYear, SchlBtchName, CollBtchName, BatchType, SchlSubjct ,CollSubjct, Teacher, Days,...
0
9700
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
9564
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
10546
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10292
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,...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7603
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
6841
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();...
1
4275
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

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.