Hello,
Does anybody know, how to link object files generated from ansi c program
with the object files generated from C++ program?
In my project I have written ISR functions in ansi c language and scheduler
in C++ language. The scheduler has to send the signal to the process which
is written in ansi c language.
In the c program, I have to call some C++ functions from my C++ files by
linking their respective object files.
When I compile the whole project it gives several errors.
The C++ files give errors on ISR routines and c files on class. This is
obvious, but we are linking the object files so I think there would not be
any problem. Right?
Rest of my project is over and now I don’t want to change the design.
So please tell me if there is any compiler option to link c files and C++
files together in QNX 4.25.
Or please let me know the alternative way to solve my purpose.
Thanks in advance
–
Sunil Warke
What I have done is to write a C++ module with cover functions to all of the
C++ functions and methods. BUT . . .
All of your cover functions must be defined to have a C interface. I.E.
extern “C” {
int coverFunct()
}
{
return callToCppFunction();
}
“Sunil Warke” <sunil@bnftech.com> wrote in message
news:aesvtr$9ok$1@inn.qnx.com…
Hello,
Does anybody know, how to link object files generated from ansi c program
with the object files generated from C++ program?
In my project I have written ISR functions in ansi c language and
scheduler
in C++ language. The scheduler has to send the signal to the process which
is written in ansi c language.
In the c program, I have to call some C++ functions from my C++ files by
linking their respective object files.
When I compile the whole project it gives several errors.
The C++ files give errors on ISR routines and c files on class. This is
obvious, but we are linking the object files so I think there would not be
any problem. Right?
Rest of my project is over and now I don’t want to change the design.
So please tell me if there is any compiler option to link c files and C++
files together in QNX 4.25.
Or please let me know the alternative way to solve my purpose.
Thanks in advance
–
Sunil Warke
Hi,
Thank you very much,
It’s working.
Once again thanks
Sunil
“Bill Caroselli (Q-TPS)” <QTPS@EarthLink.net> wrote in message
news:aet1kl$ajo$1@inn.qnx.com…
What I have done is to write a C++ module with cover functions to all of
the
C++ functions and methods. BUT . . .
All of your cover functions must be defined to have a C interface. I.E.
extern “C” {
int coverFunct()
}
{
return callToCppFunction();
}
“Sunil Warke” <> sunil@bnftech.com> > wrote in message
news:aesvtr$9ok$> 1@inn.qnx.com> …
Hello,
Does anybody know, how to link object files generated from ansi c
program
with the object files generated from C++ program?
In my project I have written ISR functions in ansi c language and
scheduler
in C++ language. The scheduler has to send the signal to the process
which
is written in ansi c language.
In the c program, I have to call some C++ functions from my C++ files by
linking their respective object files.
When I compile the whole project it gives several errors.
The C++ files give errors on ISR routines and c files on class. This is
obvious, but we are linking the object files so I think there would not
be
any problem. Right?
Rest of my project is over and now I don’t want to change the design.
So please tell me if there is any compiler option to link c files and
C++
files together in QNX 4.25.
Or please let me know the alternative way to solve my purpose.
Thanks in advance
–
Sunil Warke
\