Too Many SegDef - Data DLL - Proper ways to clear this up?

I’ve read on here and in other places ways to deal with this. I’m going through and removing unused table definitions. I did the same with templates.

I suppose if push comes to shove, I can create 2 or more data.dlls and create application groups, and use JSON and NetTalk-based services to pass data and trigger processing. I already have 6 services that perform repetitive functions, allowing me to remove bottlenecks from the desktop and NetTalk server apps. Still had one dictionary.

This can help;

Also I recommend
Application Menu,
Repopulate Module Option
1 procedure per module.

If this is a NetTalk Web Server app, then there are other things to do as well.

It’s a Data.DLL. Checking “Generate the declarations in Modules” gave me 4313 unresolved references. Grr…

good, you’re making progress. What were the errors?

We have more than one data.dll. In each data.dll:
“Generate all file declarations” - OFF
“Export all file declarations” - ON
If you do like that - each data.dll will export only file declarations for files that you use in that dll.
So you need to create one “dummy procedure” and on that procedure add per example half of the files from your dictionary.
Second data.dll (data2.dll) is very similiar as first → just add the second half of files from your dct in dummy procedure… (make sure that you don’t put the same file(s) in both data.dlls… if you do that you will get a lot of errors…)..
No need to change anything else… (if you in data.dll add module data2.dll I think there is no need to change anything alse, just recompile all…).

1 Like

I’m back at it and will give it a try. Thanks

Hi again, I’m gonna get to this over the weekend. I have dozens of DLLs and 13 Frames that are defined to withj current, single dictionary. Is there a trick to defining to two and/or I think I’m in a corner when it comes to creating more browse/form/views/reports. Any thoughts or help?

The SegDef error occurs when you have a single CLW which contains too many segments.

So, for example, if its a Clw with procedures you reduce the number of procedures in the CLW. For NetTalk Server apps there are a couple of potential choke points and techniques for avoiding the error.

I presume though this is not a NetTalk Server App since presumably you would have mentioned that.

For an ABC DataDll CLW there is already a solution which i posted above. Youre getting errors when doing that which just means you need to understand and fix the errors. Hence my follow-up question which you ignored.

You are of course most welcome to ignore the actual solution and persue other approaches. Indeed any approach that reduces the segments in the CLW should work.

For complex situations like this though i can recommend the Wednesday webinar on ClarionLive.com . There are often multiple steps to take, and your specific context will matter, so that’s a good place to see what you are seeing and go through all the steps.

Bruce, Thanks so much. Well, today is the day I sit down with it. I intended to go your way with it. Also, I do watch you folks on YouTube. I just can’t do it live because of scheduling. Too many irons…Thanks again, Dave

Hey Bruce,

I am going down your path. I was just surprised to see that response. Anyways this is the data.app that compiles into a dll with just the dictionary. This alone gets the error. Every DLL/EXE refers to it, including my 9 NetServers. I intend to move a field research app to the field as a net talk App. I have one of the examples modified enough to know what we need to do will be perfect with that interaction.

Well, off to work on the data.dll. If it gets too screwy I can spilt it into two functional dlls. I finished pulling all the micro services out so i can remove the Data.dll form those services and use a new one. Thanks to your live archives, I have been able to use String Theory with Jfiles and XFiles to handle most communications and transaction triggers. I’ve successfully communicated between my services and a customers APIs.

Just getting the data.dll to compile will help me out on a timeline.

Thanks Again,

Dave

Sent using the mail.com mail app

What errors are you getting?

Have you used @CarlBarnes tool to help identify the problem areas?

BobZ explanation from 2004.

Another thread on SegDef.

I have noticed Alexey always defines his variables with the Auto attribute, this may help reduce the incidence of SegDef errors. I dont know, not looked into it too much at this stage.

My App Splitter is not going to help with the Data DLL and too many DCT files.

With the following:

With neither boxes checked:

I’m assuming this is your data dll…

Check the instructions for using StringTheory in a data dll.

This might be relevant
https://www.capesoft.com/docs/StringTheory3/StringTheory.htm#HandCoders

Add the StringTheoryLinkMode and StringTheoryDllMode project defines to your project. Set
StringTheoryLinkMode=>1
if the class should be linked into the project, and
StringTheoryDllMode=>1
if the object is exported from another DLL.

Check your project pragma’s for your data dll.

We have a single DCT with 1230+ tables. It is impossible to have only one data.dll without “Too Many SegDef” error.. So, we split it to two data.dll’s (it is still only one dct, everything else remains the same at it was before).. How to do that is explained in my previous post…

Hi

As you are trying to compile the “data” dll, you need to make sure the global extension for StringTheory (and any other Capesoft tools) have the correct Multi-DLL settings.

In the Application Global Extension open StringTheory setting and make sure you tick both checkboxes

  • This is part of a Multi-DLL program
  • Export StringTheory Class from this DLL

The template will handle the StringTheory Link and DLL mode, so there is no need to handle that yourself.

Mark

Hi Mark,

I have it on with all of them. I don’t see an option on Nettalk. GRR

Thanks.

Hi,

I’m not sure how to set this up. I get two DLLs, but I don’t follow how to define it as one DCT for use in the IDE.

From Clarion help:
Generate all file declarations
Generates all file declarations in the dictionary, even if not specified in any procedure’s Data / Tables Pad.

In other words, if you uncheck this option - File declarations will be generated only for files specified in any priocedure’s Data/Tables pad (only files used in that app).

So , you only need to create 2 data dll-s.. In both of them use the same dct, and uncheck Generate all file Declarations. Create some dummy procedure and and attach half of the files from your dct… (first half of the files in the first data dll, and other half of files in the second data dll…
In all other dll/exe apps just add this second data.dll (in the same way like you did with the first one)..