Connecting Tech Pros Worldwide Help | Site Map

problems with extern.

  #1  
Old December 1st, 2005, 11:25 PM
Levi Campbell
Guest
 
Posts: n/a
Okay, I'm working on a library with another person and I need to call
on code from my partner's half of the library. I have been calling
extern as "extern "language" type funcname (args)", but when I compile,
I get the following error messages with g++ 3.4.4.

error: expected primary-expression before "extern"
error: expected ';' before "extern"
error: expected ')' before "extern"

I've googled using both the error messages and "calling external
functions in C and C++" as keywords and got nil and there was nothing
in the g++ manuel, what am I doing wrong?

  #2  
Old December 1st, 2005, 11:45 PM
Alf P. Steinbach
Guest
 
Posts: n/a

re: problems with extern.


* Levi Campbell:[color=blue]
> Okay, I'm working on a library with another person and I need to call
> on code from my partner's half of the library. I have been calling
> extern as "extern "language" type funcname (args)", but when I compile,
> I get the following error messages with g++ 3.4.4.
>
> error: expected primary-expression before "extern"
> error: expected ';' before "extern"
> error: expected ')' before "extern"
>
> I've googled using both the error messages and "calling external
> functions in C and C++" as keywords and got nil and there was nothing
> in the g++ manuel, what am I doing wrong?[/color]

Show some code.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
  #3  
Old December 1st, 2005, 11:55 PM
Victor Bazarov
Guest
 
Posts: n/a

re: problems with extern.


Levi Campbell wrote:[color=blue]
> Okay, I'm working on a library with another person and I need to call
> on code from my partner's half of the library. I have been calling
> extern as "extern "language" type funcname (args)", but when I compile,
> I get the following error messages with g++ 3.4.4.
>
> error: expected primary-expression before "extern"
> error: expected ';' before "extern"
> error: expected ')' before "extern"
>
> I've googled using both the error messages and "calling external
> functions in C and C++" as keywords and got nil and there was nothing
> in the g++ manuel, what am I doing wrong?
>[/color]

You're not following the recommendations put forth by FAQ 5.8, that's
what you're doing wrong.
  #4  
Old December 2nd, 2005, 01:25 AM
Andrej Hristoliubov
Guest
 
Posts: n/a

re: problems with extern.



[color=blue]
> You're not following the recommendations put forth by FAQ 5.8, that's
> what you're doing wrong.[/color]

Yeah, dude - listen to my friend and school mate Victor and quickly
follow the recommendations. And don't comeback until you memorize it.

Vitya, when are we meeting for bulochki?

as always, hi to babushka. I spoke with her last night and she says
that you're haven't called her in weeks. Get your life together and
stop wasting it with different women......

  #5  
Old December 2nd, 2005, 02:35 AM
Levi Campbell
Guest
 
Posts: n/a

re: problems with extern.


Ah, I didn't know about that. My problem has been fixed and I've got
the mentioned FAQ bookmarked. Thank you.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with basics.. iCoder answers 2 March 24th, 2007 05:05 PM
SWIG problems with gcc and Cygwin? Michael Yanowitz answers 0 June 20th, 2006 08:35 PM
Problems with running RPC code ebby83@gmail.com answers 2 November 15th, 2005 05:41 AM
Problems with multiple CPP files in my project Daniel Moree answers 9 July 22nd, 2005 10:30 PM