473,465 Members | 1,366 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

__declspec(dllexport) equivalent under linux / osx with g++ ?

Hi,

i'm bulding a multi platform app under windows/linux/osx
an i have a bit of trouble exporting c++ symbols from
a dynamic library...
Under windows, i compile a dll exporting symbols
using :
__declspec(dllexport) & __declspec(dllimport)

I do export non-static and static members from my c++ code
without any problems ...
But I can't find a way to do it uner linux or osx with g++
anybody can help on this one ?

Thanks a lot
Francois

Mar 3 '06 #1
3 12407
On 2 Mar 2006 19:18:10 -0800, "ma*********@gmail.com"
<ma*********@gmail.com> wrote in comp.lang.c++:
Hi,

i'm bulding a multi platform app under windows/linux/osx
an i have a bit of trouble exporting c++ symbols from
a dynamic library...
Under windows, i compile a dll exporting symbols
using :
__declspec(dllexport) & __declspec(dllimport)

I do export non-static and static members from my c++ code
without any problems ...
But I can't find a way to do it uner linux or osx with g++
anybody can help on this one ?

Thanks a lot
Francois


Ask in the news:comp.os.linux.development.* family. These things are
not part of the C++ language to start with, they are non-standard
platform specific extensions.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Mar 3 '06 #2
Jack Klein wrote:
On 2 Mar 2006 19:18:10 -0800, "ma*********@gmail.com"
<ma*********@gmail.com> wrote in comp.lang.c++:

Hi,

i'm bulding a multi platform app under windows/linux/osx
an i have a bit of trouble exporting c++ symbols from
a dynamic library...
Under windows, i compile a dll exporting symbols
using :
__declspec(dllexport) & __declspec(dllimport)

I do export non-static and static members from my c++ code
without any problems ...
But I can't find a way to do it uner linux or osx with g++
anybody can help on this one ?

Thanks a lot
Francois

Ask in the news:comp.os.linux.development.* family. These things are
not part of the C++ language to start with, they are non-standard
platform specific extensions.


Or perhaps in the gnu.gcc.help newsgroup

--
To reply, take of all ZIGs !!

Alternative email address: em******@asfandyarZIG.cjbZIG.netZIG
Mar 3 '06 #3

ma*********@gmail.com wrote:
Hi,

i'm bulding a multi platform app under windows/linux/osx
an i have a bit of trouble exporting c++ symbols from
a dynamic library...
Under windows, i compile a dll exporting symbols
using :
__declspec(dllexport) & __declspec(dllimport)

I do export non-static and static members from my c++ code
without any problems ...
But I can't find a way to do it uner linux or osx with g++
anybody can help on this one ?

I might be barking mad here but I believe, based upon my own experience
of porting a windows DLL to a linux shared library, that, with a shared
library, you don't have control over which symbols are exported from
the DLL.

I have, by the way, always preferred to use a .def file to declare the
exports from a DLL. I really dislike having to muck with function
signatures.

Regards,

Jon Trauntvein

Mar 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gawel | last post by:
Hajo, I have two dlls, both of them are compiled with /clr switch. In first dll project I have managed and unmanaged classes. One of the unmanaged I would like to use outside therefore I marked...
1
by: Geoffrey | last post by:
We write lots of cross platform code at my company. To facilitate this, class declarations are handled like this (simplification): #if defined(_WIN32) #if defined(BUILDLIB) #define...
5
by: Felix I. Wyss | last post by:
Good Afternoon, I recently noticed that some very simple methods of a template declared and used in a DLL library get inlined when used by the DLL itself, but not by other DLLs and EXEs. After...
5
by: Jason W | last post by:
I have a C# class that I wan't to be able to use in VB6 and VBA applications. To do this I was trying to use a mixed managed VC++ dll and export a function. Doing this I get an error "The memory...
8
by: bonk | last post by:
Hello, I created a MFC extension dll (using VS 2005 Beta 2) that is supposed to export a class that uses .NET internally (See header below) und later shall be used by a plain MFC Project (without...
7
by: Martin Pritchard | last post by:
Hi, Sorry for my ignorance, but I'm a bit new to C++. I've been handed over a C++ app written in VS2002 which I have to convert to VS2005. Apparently it's been written in a C style, but cannot...
2
by: Luis | last post by:
Hello... How can I do an exported function in Visual Basic.Net? In Visual C++ the source is the next... but I need the same in VB.Net Thank you /* This is an example of an exported...
2
by: Bit Byte | last post by:
I have written a Dll which contains a class. I overload the "<<" opertor in global functions to perform Ostream operations - a follows: ostream &operator << (ostream &os, const struct _mystruct_t...
1
by: =?Utf-8?B?RmFiaWFu?= | last post by:
Hello, I want to give multiple native classes (in different mixed mode dlls) access to a managed output window (for error messages). Therefore I wrote a native singleton with __declspec...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.