Porting from VC++ to BC++.. clarification

I am porting an application build environment from VC++1.52 to BC++4.52. After compiling all the sources, I am stuck up with a
link error "Group DGROUP exceeds 64K".

In VC++ source code, the _segment directive has been used to control the segments into which data should be placed. This __segment directive is not accepted in BC++ 4.52. As a result, all the data segments are placed into the default data segment viz DGROUP. I anticipate this could be the possible cause of the Link error. Is this so
or  is it some other cause ?

If so , is there any equivalent for __segment in BC++4.52 ?? I want to rewrite a statement like

      segregs.ds = (__segment) &segregs

Can someone help on this please ??
sasikalaAsked:
Who is Participating?
 
arikkaConnect With a Mentor Commented:
Put this line

#pragma option -zEYourName in the cpp.

Sets the name of the segment where data should be placed to name.

See Borland help :
#pragma option -z...
0
 
akalmaniCommented:
Hi sasikala !!
   u can increase the segment size in the project settings i don't remember exactly but even i had faced the same problem before and solved it by increasing the segment size
0
 
AlexVirochovskyCommented:
From Owl FAQ:
What can I do when DGROUP exceeds 64K?


It is actually quite simple. Look which modules have the largest data part (it is shown by the project manager).  Create a new style sheet. Alter the segment names data page so the * are replace by any other name than DGROUP.   Select this sheet for the nodes that contain a lot of data. The data will be put into the given group instead of DGROUP, thus solving your problem. Of course, this can also be done directly while choosing the local options for a node.

Wim Veldhuis

0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
sasikalaAuthor Commented:
Thanks for your ersponses. My application has about 70-80 programs varying in code size from 0 to 35,000 and data size from 20 to 20,000.
I defined about 9 to 10 Style sheets and carefully associated them with the various source programs, such that none of them would exceed 64K.

After doing this, still I get the same error "Group DGROUP exceeds 64K".
The linker halts at CRTLDLL.lib.

can you help me how to proceed further ?

Regards
Sasi
0
 
sasikalaAuthor Commented:
Thanks for your ersponses. My application has about 70-80 programs varying in code size from 0 to 35,000 and data size from 20 to 20,000.
I defined about 9 to 10 Style sheets and carefully associated them with the various source programs, such that none of them would exceed 64K.

After doing this, still I get the same error "Group DGROUP exceeds 64K".
The linker halts at CRTLDLL.lib.

can you help me how to proceed further ?

Regards
Sasi
0
 
sasikalaAuthor Commented:
Thanks for your responses. My application has about 70-80 programs varying in code size from 0 to 35,000 and data size from 20 to 20,000.
I defined about 9 to 10 Style sheets and carefully associated them with the various source programs, such that none of them would exceed 64K.

After doing this, still I get the same error "Group DGROUP exceeds 64K". The linker halts at CRTLDLL.lib.

Can you help me how to proceed further ?

Regards
Sasi
0
 
AlexVirochovskyCommented:
Sasi, before i will tray to help you,
can I ask you some question?
You accept a "reply" of arikka,
but tray solve you problem by metod,
that i wrote you! And how about eticks?
0
 
sasikalaAuthor Commented:
Hello,

Since I was prompted to validate Arikka's response and my understanding was that he has almost given a command line equivalent for the same type of solution, I put some points there. Indeed I am still not aware, when I accept someone's reply, how I should acknowledge it. Even now, if I can someway notify to the system that I have accepted your earlier reply, please let me know how I should do that.

I hope I am answering to your point. Also I don't understand whats meant by 'eticks' ??

Regards
Sasi
0
 
AlexVirochovskyCommented:
>>eticks
may be i have problem with spelling,
but i means "moral problem"
>>I am still not aware, when I accept someone's reply
You allways can
1. Accept reply, if you think, that
this reply helps you.
2. Reject reply, if you think, that
this reply wrong.
3. Ask some clarification, if you
don't understand some detail.
About you situation: ask new Question
and i 'll send you some
advices(i have large experience with BC!). But remember: i am, for example,
don't reply to Q < 50 PTS, and most experts too. More  PTS: faster reply!
0
 
sasikalaAuthor Commented:
Hello,

Since I was prompted to validate Arikka's response and my understanding was that he has almost given a command line equivalent for the same type of solution, I put some points there. Indeed I am still not aware, when I accept someone's reply, how I should acknowledge it. Even now, if I can someway notify to the system that I have accepted your earlier reply, please let me know how I should do that.

I hope I am answering to your point. Also I don't understand whats meant by 'eticks' ??

Regards
Sasi
0
 
sasikalaAuthor Commented:
Hello Alex (hope I can address you so..)

Thanks for your immediete response. I believe I can increase my
points either by waiting day-over-day or I can purchase points at
some cost. Since I work for an organisation, there will be lot of
formalities involved and I am not sure if I will be sanctioned to
purchase points.

Is there some other way out ? Otherwise, I will wait for few more days to capture 50 points, then come back with my queries.

Regards
Sasi
0
 
AlexVirochovskyCommented:
Lets wait.
But 1 advice now(free):
Test  in View|Project data_sizes
If you see, that one of modules is very large, try diminish it. How?
Usually, this size depends from array
as
int myArray[2000]; -> 8000b in DGroupe
Instead of this use or dynamic allocation as:
int myArray = new int[2000]; //or
 myArray = calloc(2000, sizeof(int));
and don't forget release memory:
or delete [] myArray; or
 free (myArray);
Alex
0
All Courses

From novice to tech pro — start learning today.