This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Fwd: Static variable in dll cannot be auto-imported in release, but can in debug version
- From: Zahroof Mohamed <zahroofm at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Cc: Eljay Love-Jensen <eljay at adobe dot com>
- Date: Tue, 8 Feb 2005 19:41:19 -0500
- Subject: Fwd: Static variable in dll cannot be auto-imported in release, but can in debug version
- References: <4202465E.5020102@starnetworks.us> <6.2.0.14.2.20050203095348.020f8d18@iplan-mn.corp.adobe.com> <6e3340890502032329770af7d3@mail.gmail.com>
- Reply-to: Zahroof Mohamed <zahroofm at gmail dot com>
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