Yes, I compiled both parts of codes with the same compiler. But I did not
use extern "c" definition.
BR/
From: Dave Smith <[EMAIL PROTECTED]>
Reply-To: Provo Linux Users Group Mailing List <[email protected]>
To: Provo Linux Users Group Mailing List <[email protected]>
Subject: Re: c++ function can not call c routine or access c global
variable. Why?
Date: Thu, 23 Mar 2006 06:42:22 -0700
Laurent R wrote:
Hi, All:
There are two parts of codes in my project. One is implemented with C++,
the other is C. I compiled them repectively and link together. But I found
the problem. The function in C++ can not call the routine coded with c. It
will crash the system. And also the function in C++ can not access the
global variable defined in C. It will get the un-initialized value from
the global variable.
Have u met this kind of problem? Who can help me to explain this kind of
problem?
Did you compile both parts of the code with the same C++ compiler? Did you
use extern "C" where necessary?
--Dave
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/