Looking for a makefile sample to generate a simple dll

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Looking for a makefile sample to generate a simple dll

Shukla, Mangesh
Hi ,
    I am a newbie and have started working on a simple DLL, which interacts with OpenOffice.org. My DLL does not add any new types to the Application, but only populates information in the spreadsheet from an external application.  I have been able to create Visual Studio project to create the DLL and it is working fine.  Now I would like to use the Makefile to generate the same as the DLL needs to be ported on Mac as well as Linux. I am unable to get a Makefile which could be a good starting point. I have looked at the SDK samples makefiles, but they are either generating an EXE or building a component DLL. I am looking for  a sample which generates an external DLL.

I would be grateful if someone could share a sample for the same.

Thanks,
Mangesh


Reply | Threaded
Open this post in threaded view
|

Re: Looking for a makefile sample to generate a simple dll

Ariel Constenla-Haile-2
Hi Mangesh,

On Tue, Jan 22, 2013 at 01:44:30PM +0000, Shukla, Mangesh wrote:

> Hi , I am a newbie and have started working on a simple DLL, which
> interacts with OpenOffice.org. My DLL does not add any new types to
> the Application, but only populates information in the spreadsheet
> from an external application.  I have been able to create Visual
> Studio project to create the DLL and it is working fine.  Now I would
> like to use the Makefile to generate the same as the DLL needs to be
> ported on Mac as well as Linux. I am unable to get a Makefile which
> could be a good starting point. I have looked at the SDK samples
> makefiles, but they are either generating an EXE or building
> a component DLL. I am looking for  a sample which generates an
> external DLL.
>
> I would be grateful if someone could share a sample for the same.
Assuming that your library is only linked to the standard libraries,
with no external dependencies, simply copy the rules to make the
UNO component libraries, but remove the code that links the library to
the URE libraries.

The only example I've in mind right now is the MySQL SDBC driver
extension, that builds both the C/Connector and the C++/Connector:
http://code.google.com/a/apache-extras.org/p/aoo-my-sdbc/source/browse/source/external.mk

though it's a little more complex, it does what you're trying to do.
The driver is not linked to the C++/Connector, it loads the library at
runtime, and uses function pointers.


Regards
--
Ariel Constenla-Haile
La Plata, Argentina

attachment0 (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Looking for a makefile sample to generate a simple dll

Shukla, Mangesh
Hi Ariel,
    Thanks for the quick response. I will check out the two approaches.
Regards,
Mangesh


-----Original Message-----
From: Ariel Constenla-Haile [mailto:[hidden email]]
Sent: Wednesday, January 23, 2013 6:00 AM
To: [hidden email]
Subject: Re: Looking for a makefile sample to generate a simple dll

Hi Mangesh,

On Tue, Jan 22, 2013 at 01:44:30PM +0000, Shukla, Mangesh wrote:

> Hi , I am a newbie and have started working on a simple DLL, which
> interacts with OpenOffice.org. My DLL does not add any new types to
> the Application, but only populates information in the spreadsheet
> from an external application.  I have been able to create Visual
> Studio project to create the DLL and it is working fine.  Now I would
> like to use the Makefile to generate the same as the DLL needs to be
> ported on Mac as well as Linux. I am unable to get a Makefile which
> could be a good starting point. I have looked at the SDK samples
> makefiles, but they are either generating an EXE or building a
> component DLL. I am looking for  a sample which generates an external
> DLL.
>
> I would be grateful if someone could share a sample for the same.

Assuming that your library is only linked to the standard libraries, with no external dependencies, simply copy the rules to make the UNO component libraries, but remove the code that links the library to the URE libraries.

The only example I've in mind right now is the MySQL SDBC driver extension, that builds both the C/Connector and the C++/Connector:
http://code.google.com/a/apache-extras.org/p/aoo-my-sdbc/source/browse/source/external.mk

though it's a little more complex, it does what you're trying to do.
The driver is not linked to the C++/Connector, it loads the library at runtime, and uses function pointers.


Regards
--
Ariel Constenla-Haile
La Plata, Argentina