?
Solved

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

Posted on 1997-03-21
1
Medium Priority
?
338 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 100 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Suggested Courses
Course of the Month12 days, 20 hours left to enroll

777 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