Solved

Help With Microsoft C/C++ 7.0 linking stack problem

Posted on 1997-03-21
1
321 Views
Last Modified: 2011-09-20
Hello i am linking my program and its library plus some other assembly with the following line in a dos session under windows for microsoft c/c++ 7.0:

link /ST:8192/CO texdemo.obj+fpdiv.obj+fpmul.obj,,,ben.lib,,

and it gives me :

LINK:  fatal error L2041: stack plus data exceed 64k

how can i fix this??? Is there something to do to the /ST:8192 to make this work?? Is anyone else familiar with this?
Thanx in advance for helping me
I can be reached at:   benco@gisco.net
0
Comment
Question by:Doug8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
emmons earned 50 total points
ID: 1249612
You are giving at an 8K stack. Do you need this much? Try cutting it on half (/ST:4096).
You should look at the map to determine the total size of your data segment so that you can see how much smaller you need to make the stack.
You might also concider compiling your program in another memory model.
Keep in mind that no single data item can be greater than 64K in any model other than HUGE.
It sounds like you are probably using small model now and need to convert to COMPACT.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to understand recursion 12 232
c++ substatte a varabe for a string in a LPCTSTR statment 8 94
How to learn Linux? 10 80
Assignment from incompatible pointer type? 2 34
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question