This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: Static variable in dll cannot be auto-imported in release, but can in debug version


Hi,

I'd sent this message earlier, but it looks like it didn't get
through. I would really appreciate it if someone could offer some
advice.

>>


I'm new to this group. Couldn't find information regarding this topic
and wondered whether anyone had any pointers.

I'm using gcc3.4.3 with Win 2K. Parinya software's MinGW Developer
Studio as the IDE.

I've written a program in C++ that has global variables (object
factories) stored in dlls. However, when I try to build this program,
the debug version builds alright but the release version bombs because
it says it can't auto-import the variable. Here is an example case
that shows this.

--------------------Configuration: Refrigerant - Debug--------------------
Compiling source file(s)...
Refrigerant.cpp
Linking...
Info: resolving ZAPP::CZObj::ZObjFactory      by linking to
__imp___ZN4ZAPP5CZObj11ZObjFactoryE (auto-import)
Info: resolving _cinput_ by linking to __imp__cinput_ (auto-import)
Creating library file:
C:\Zahroof\EAZ\ZObj\Refrigerant\Debug\libRefrigerant.dll.a

Refrigerant.dll - 0 error(s), 0 warning(s)

--------------------Configuration: Refrigerant - Release--------------------
Compiling source file(s)...
Refrigerant.cpp
Linking...
Info: resolving _cinput_ by linking to __imp__cinput_ (auto-import)
Info: resolving ZAPP::CZObj::ZObjFactory      by linking to
__imp___ZN4ZAPP5CZObj11ZObjFactoryE (auto-import)
C:\Zahroof\EAZ\ZObj\Refrigerant\Release\Refrigerant.o(.text+0xc721):Refrigerant.cpp:
variable 'ZAPP::CZObj::ZObjFactory' can't be auto-imported. Please
read the documentation for ld's --enable-auto-import for details.
C:\Zahroof\EAZ\ZObj\Refrigerant\Release\Refrigerant.o(.text+0xc748):Refrigerant.cpp:
variable 'ZAPP::CZObj::ZObjFactory' can't be auto-imported. Please
read the documentation for ld's --enable-auto-import for details.
Creating library file:
C:\Zahroof\EAZ\ZObj\Refrigerant\Release\libRefrigerant.dll.a
collect2: ld returned 1 exit status

Refrigerant.dll - 0 error(s), 0 warning(s)

Help, please.

Zahroof M


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]