www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



c++ - Linker crash

↑ ↓ ← Ed <matador home.nl> writes:
Hi,

I am using the latest version but also previous versions produce
the following error message:

  Unexpected OPTLINK termination at EIP=4000F982

The status line shows the module LIB/USER32.LIB

The library is from 2 january 2006 and 70,144 Kb

Any idea?

Ed
Apr 20 2007
↑ ↓ Ed <matador home.nl> writes:
Found the trouble maker, it happens when you define a table > 1
million entries, for instance:

#define EOC_MAX	 1000000
static unsigned int hkw [EOC_MAX];

Now raise EOC_MAX to 2 million and the linker crashes.

Hoping for a solution....

Ed



== Quote from Ed (matador home.nl)'s article
 Hi,
 I am using the latest version but also previous versions produce
 the following error message:
   Unexpected OPTLINK termination at EIP=4000F982
 The status line shows the module LIB/USER32.LIB
 The library is from 2 january 2006 and 70,144 Kb
 Any idea?
 Ed

Apr 20 2007
↑ ↓ Walter Bright <newshound1 digitalmars.com> writes:
Ed wrote:
 Found the trouble maker, it happens when you define a table > 1
 million entries, for instance:
 
 #define EOC_MAX	 1000000
 static unsigned int hkw [EOC_MAX];
 
 Now raise EOC_MAX to 2 million and the linker crashes.
 
 Hoping for a solution....

The easiest solution is to new() the array, rather than statically allocate it.
Apr 20 2007
↑ ↓ Ed <matador home.nl> writes:
How to "new()" is new to me, can you explain Walter?

Ed


== Quote from Walter Bright (newshound1 digitalmars.com)'s article
 Ed wrote:
 Found the trouble maker, it happens when you define a table > 1
 million entries, for instance:

 #define EOC_MAX	 1000000
 static unsigned int hkw [EOC_MAX];

 Now raise EOC_MAX to 2 million and the linker crashes.

 Hoping for a solution....

allocate it.

Apr 20 2007
↑ ↓ Walter Bright <newshound1 digitalmars.com> writes:
new() is C++. If you're using C, you can use malloc() instead.

Ed wrote:
 How to "new()" is new to me, can you explain Walter?
 
 Ed
 
 
 == Quote from Walter Bright (newshound1 digitalmars.com)'s article
 Ed wrote:
 Found the trouble maker, it happens when you define a table > 1
 million entries, for instance:

 #define EOC_MAX	 1000000
 static unsigned int hkw [EOC_MAX];

 Now raise EOC_MAX to 2 million and the linker crashes.

 Hoping for a solution....

allocate it.


Apr 20 2007
↑ ↓ Ed <matador home.nl> writes:
Ok, will find my way around. But, are you going to fix the linker
problem? I mean, compiling with DOSX no such problems do occur.

Thx again for excellent support & compiler.

Ed (ex Zortech user)



 new() is C++. If you're using C, you can use malloc() instead.
 Ed wrote:

 How to "new()" is new to me, can you explain Walter?

 Ed


 Ed wrote:
 Found the trouble maker, it happens when you define a table >




 million entries, for instance:

 #define EOC_MAX	 1000000
 static unsigned int hkw [EOC_MAX];

 Now raise EOC_MAX to 2 million and the linker crashes.

 Hoping for a solution....




 allocate it.



Apr 21 2007
↑ ↓ → Walter Bright <newshound1 digitalmars.com> writes:
Ed wrote:
 Ok, will find my way around. But, are you going to fix the linker
 problem? I mean, compiling with DOSX no such problems do occur.
 
 Thx again for excellent support & compiler.
 
 Ed (ex Zortech user)

It won't be fixed in the near future.
Apr 22 2007