| From: | |
| Date: | 26 Feb 2001 at 15:39:43 |
| Subject: | Re: Re[2]: Link together C and C++ |
> Hello Laurent,
Hello,
>
> LF> As a conclusion :
> LF> - C++ may call C function
> LF> - it's difficult to call C++ from C.
>
> Hmmm...
> If I can't call C++ from C, how I can compile
> MUI-targeted application
> in C++ ??? I do not have idea!
Normaly, C sources _may_ compile under C++.
If is not possible (badly writen C :-( ), you must
have you main function into a C++ file and then call
your normal C func from there.
>
> When I compile MUI program (test.c - simple window
> with one button!),
> all is Ok. But when I start to write own class, my
> DoMethod() is
> trashed... :( Different declaration, etc...
> This was a reason for having testmain.c (MUI gui)
> and test.cpp (piece
> of source with own classes).
Hum, why main() stuff can't be done into test.cpp ?
You should have in testmain.cpp
extern "C" {
};
int main(int ac, char **av){
old_c_main(av, av); // the old main with C only code
...
C++ works here
...
}
Bye
Laurent
=====
The misspelling master is on the Web.
_________
/ /(
/ Dico / / 100 % Dictionnary Free !
/________/ /
(#######( /
Quoi, des fautes d'orthographe! Pas possible ;-D.
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/