Issues with using g++ and dynamic libraries
karim Hamed-Abdelouahab
khamed@progese.com
Fri Jun 6 13:28:00 GMT 2003
Hi Luca,
don't give up so quickly.
Let us take a look to the source of your code. Independant that you wanna to
build a library or not... ;-)
You have to build a C++ structure. I mean, you have to declare a class in a
classDoThis.hh file and to implement this class in a classDoThis.cc or
classDoThis.cpp. Then you can choose the g++ compiler.
regards.
Karim
-----Message d'origine-----
De : Luca.Illengo@marconiselenia.com
[mailto:Luca.Illengo@marconiselenia.com]
Envoyé : vendredi 6 juin 2003 15:25
à : khamed@progese.com
Objet : RE: Issues with using g++ and dynamic libraries
Hello Karim,
I have tried all you said, but there was no way to make it work !!
Thank you anyway,
Luca
"karim Hamed-Abdelouahab" <khamed@progese.com>@gcc.gnu.org on 06-06-2003
01:45:19 PM
Please respond to <khamed@progese.com>
Sent by: gcc-help-owner@gcc.gnu.org
To: <gcc-help@gcc.gnu.org>
cc:
Subject: RE: Issues with using g++ and dynamic libraries
Hi Luca,
I'll suggest to change the name main.c to main.cc (same with CC.c).
Note: The attached Makefile the name of the compiler is still gcc ;-).
Change it to g++.
regards.
Karim
-----Message d'origine-----
De : gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]De la
part de Luca.Illengo@marconiselenia.com
Envoyé : vendredi 6 juin 2003 12:07
à : gcc-help@gcc.gnu.org
Objet : Issues with using g++ and dynamic libraries
Hi everybody !!
I have used gcc to open and run functions from a dll using the following
source code:
(See attached file: main.c) and the little shared dll object: (See attached
file: CC.c)
by using the following makefile: (See attached file: makefile)
and everything goes OK.
But when using g++ (e.g. running makefile using 'make COMPILER_NAME=g++')
the shared library results not being readable.
The gcc version I'm using is 3.3, installed on a previously running 2.96.
Can you help me ? What did I do wrong ?
Luca Illengo
More information about the Gcc-help
mailing list