Work Klo wrote:
> Greeting!
>
> I have done some customization. I have an old C library. I have written
> a C++ program to use that C library. I then have KaiOffice to run that C++
> program at startup.
>
> (My platform is Windows XP.)
>
> In the header file of C library, I have the following:
> #ifdef __cpluscplus
> extern "C" {
> #endif
>
> I of course have this at the end:
> #ifdef __cplusplus
> }
> #endif
>
> During the compilation of C++ program, the #ifdef statement is working to
> prevent the managling (I think that is what is called).
>
> In the VCL module, in the .\source\app\svmain.cxx at the startup code, I
> have to call a function from that C library. I #include the h file from
> that C library. During compilation, I get the following error:
> error C2598: linkage specification must be at global scope
>
> The error refers to the line 'extern "C"'...
>
> What is wrong? I think during compliation of svmain.cxx, the compiler will
> handle that extern "C" line gracefully.
Is it possible that your "extern C" declaration is inside a class
definition or namespace because your include statement is at a place
where it appears at global scope?
Best regards,
Mathias
--
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]