473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

I am getting anachronism errors with the solaris compiler

hi All,
Even though my function is not extern "C" ed I keep getting this
failure

ucliForceCmdObject.C", line 194: Warning (Anachronism): Formal
argument mhpiConnCb of type extern "C" int(*)(unsigned long*,unsigned
long*) in call to mhpi_connectivity_traverse(unsigned long*, unsigned
long*, extern "C" int(*)(unsigned long*,unsigned long*),
mhpiConnTrvrsModeT) is being passed int(*)(unsigned long*,unsigned
long*).
"ucliForceCmdObject.C", line 276: Warning (Anachronism): Formal
argument mhpiConnCb of type extern "C" int(*)(unsigned long*,unsigned
long*) in call to mhpi_connectivity_traverse(unsigned long*, unsigned
long*, extern "C" int(*)(unsigned long*,unsigned long*),
mhpiConnTrvrsModeT) is being passed int(*)(unsigned long*,unsigned
long*).

Can anybody help me out here

Jul 6 '07 #1
5 4005
On Jul 6, 7:46 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
wrote:
Even though my function is not extern "C" ed I keep getting this
failure
ucliForceCmdObject.C", line 194: Warning (Anachronism): Formal
argument mhpiConnCb of type extern "C" int(*)(unsigned long*,unsigned
long*) in call to mhpi_connectivity_traverse(unsigned long*, unsigned
long*, extern "C" int(*)(unsigned long*,unsigned long*),
mhpiConnTrvrsModeT) is being passed int(*)(unsigned long*,unsigned
long*).
"ucliForceCmdObject.C", line 276: Warning (Anachronism): Formal
argument mhpiConnCb of type extern "C" int(*)(unsigned long*,unsigned
long*) in call to mhpi_connectivity_traverse(unsigned long*, unsigned
long*, extern "C" int(*)(unsigned long*,unsigned long*),
mhpiConnTrvrsModeT) is being passed int(*)(unsigned long*,unsigned
long*).
Can anybody help me out here
Not unless you show us some code. But typically, this error is
caused by passing the address of an `extern "C++"' function as
an argument to a function expecting `extern "C"'. That is, in
fact, very precisely what the error message says: the formal
argument mhpiConnCb in function mhpi_connectivity_traverse
should have the type `extern "C" int (*)( unsigned long*,
unsigned long*)', and you've passed it an `extern "C++" int(*)(
unsigned long*, unsigned long* )'. (If you don't specify the
linkage, it is `extern "C++"'; all member functions, static or
otherwise, are also `extern "C++"'.)

So as you say: "my function is not extern "C" ed", and that is
the problem; it should be.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Jul 6 '07 #2
pa********@hotmail.com wrote:
hi All,
Even though my function is not extern "C" ed I keep getting this
failure

ucliForceCmdObject.C", line 194: Warning (Anachronism): Formal
argument mhpiConnCb of type extern "C" int(*)(unsigned long*,unsigned
long*) in call to mhpi_connectivity_traverse(unsigned long*, unsigned
long*, extern "C" int(*)(unsigned long*,unsigned long*),
mhpiConnTrvrsModeT) is being passed int(*)(unsigned long*,unsigned
long*).
"ucliForceCmdObject.C", line 276: Warning (Anachronism): Formal
argument mhpiConnCb of type extern "C" int(*)(unsigned long*,unsigned
long*) in call to mhpi_connectivity_traverse(unsigned long*, unsigned
long*, extern "C" int(*)(unsigned long*,unsigned long*),
mhpiConnTrvrsModeT) is being passed int(*)(unsigned long*,unsigned
long*).

Can anybody help me out here

Garage mechanic: "What can I do for you?"
You: "When I turn left, my car goes ta-pocketa-pocketa-pocketa."
Garage mechanic: "All right, let's have a look at it."
You: "Oh, I didn't bring it with me."

<http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.8>

Brian

Jul 6 '07 #3
Default User wrote:
pa********@hotmail.com wrote:
>[..]
Can anybody help me out here


Garage mechanic: "What can I do for you?"
You: "When I turn left, my car goes ta-pocketa-pocketa-pocketa."
Garage mechanic: "All right, let's have a look at it."
You: "Oh, I didn't bring it with me."
Garage mechanic: "Well, then, take two aspirins and call a doctor
in the morning".
Jul 6 '07 #4
Victors answer helped
Thanks a lot

And next time onwards I will bring the car too ( what if the car is a
highly sophisticated government vehicle not to be take for a ride
outside )

Jul 7 '07 #5
On 2007-07-07 08:59, pa********@hotmail.com wrote:
Victors answer helped
Thanks a lot
Since your still learning I'll forgive you for not quoting the text to
which you are replying, but try to do so in the future.
And next time onwards I will bring the car too ( what if the car is a
highly sophisticated government vehicle not to be take for a ride
outside )
Well, as it says in the FAQ, section 5.8, you should post a minimal but
working example, this means that if you are having troubles with your
tires you don't need to bring the whole car. For many problems you can
recreate the problem with only a few lines of code, trying to do this is
good for several reasons, one being that in the process of doing so you
might discover better understand the problem and find a solution,
another being that it's easier for those who'll try to help you if they
don't have to figure out which code is important and which is not.

--
Erik Wikström
Jul 7 '07 #6

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

Similar topics

1
by: amit | last post by:
Hi, I have got GNU c++ compiler installed on solaris.I want to create a shared object library on solaris for an External stored procedure.Got makefil.sol to be used on solaris as under : CC=CC...
3
by: pervinder | last post by:
Hi, I am using STL from http://www.stlport.org/download.html (ver 4.6.2) I see hundered's of error while compilation. I have a c++ prog which uses stl. I am providing the stlport in the include -I...
8
by: ambar.shome | last post by:
Hi, We are working on Solaris SunOS 5.8. We are using ifstream of iostream namespace. The snippet is given below: #include <iostream.h> #include <fstream.h> boolean readFile() { char...
14
by: jasclz | last post by:
Hi, Ok I tried posting this in the solaris group with no replies. So I decided I'll ask the C gurus. First off, I'm a total beginner using xdesigner and solaris. I'm using the Sun cc...
4
by: Layne Meier | last post by:
I'm having a bit of a problem trying to install Python on a Solaris 10 system. I didn't have this kind of problem when trying to install it on Solaris 8. Has anyone else experienced this...
5
by: shobhah | last post by:
Hi, We have a complete succsssfully working product on 32bit sparc solaris machine for which compiler used is CC 5.8 Now we are migarting our product from 32 bit to 64bit sparc solaris machine....
7
by: plumb and tree | last post by:
I've been trying for days to build 64 bit python with Solaris 10 + Sun Studio 12. Can anyone helpl please. This is how I tried to do build: # ./configure --prefix=/opt/python2.4...
1
by: rbalakrishnan | last post by:
Hi All i am trying to compile my C code without warning messages but i don get any idea about the below c compiler warning: line 67: Warning (Anachronism): Attempt to redefine...
2
by: parag_paul | last post by:
"vcsdvar__.cc", line 1516: Warning (Anachronism): Assigning int(*) (t_cb_data*) to extern "C" int(*)(t_cb_data*). "vcsdvar__.cc", line 1554: Warning (Anachronism): The operation "int(*)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...

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.