May 20, 2024, 04:35:16 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Too many relocations in object file

Started by Andy, June 29, 2013, 05:11:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Hi,

I was just adding some code to one of my programs, nothing special just a sub routine.

Now when I try to compile I get this error message:

File: "C:\KMS\Browser2\kmsmcont.iwb" (26986) panic: Too many relocations in object file.

What does this mean? and what must I do to clear it?

Thanks,
Andy.


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Don't know that I've ever seen that error before.

The only way I can possibly help you is for you to post all your code or send a copy to me.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy


Thanks Larry,

You have always been a big help, but on this occasion I cannot give a copy of the source code. I will perform some tests tomorrow and let you and everyone know what I find.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy


Okay, it now compiles without any errors.


This is what I did (after removing the extra sub routine):

1. Made sure all sub routines had the "(),int" on the end
    e.g.  SUB MyNewSub(),int

2. Made sure all RETURN commands had RETURN 0 or other value included

Not many had been missed but still some had.

At this point I still had the error.

3. Removed all unreferenced variables from the code.
4. Removed all unreferenced sub routines.

Finally, I added back in the extra sub routine and everything is okay.

Not exactly sure, but maybe it was too many unreferenced items?

At least it forced me to do some tidying of my code.

Hope this will help if anyone gets the same error.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Adding (),int after all your subroutines is only necessary if your subroutines return a value.
But once to define your sub with the (),int then you have to return a value thus the return 0.

But you adding all that got the results I would expect --- no change.

Just about all my programs have unused variables scattered around.  That has never caused an error to be generated.  It doe generate messages when compiling so I usually remove them just to reduce the clutter.

The only thing you did of meaning was to reduce the size of your program by removing the unused subs.

Based upon that my guess is you have a very large single file program that you are building.
If that's the case, it may work better if you break it up into multiple files and put them all in a project.

As for the showing of your code. I can understand that there are multiple reason why some people don't want to show their code.
As for sending me a copy for me to look at- more than one person has sent me proprietary/sensitive code to look at and fix.  In those cases I make sure I toss the code when I'm through helping.  Saying that just so you know that option is open.

At any rate, glad you got your program to compile; just hope the problem doesn't come back if you have more code to add.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Larry,

Just so you know, I completely trust you. The program is now around 30K of lines so think it would take someone else some time to debug.

Yes it is a single file, and it does what I need it to do for now thanks.

As always, many thanks Larry!

:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

GWS

Andy,

30,000 lines ..  :o

Wow! .. can you tell us what kind of application it is that grew so big ..  ;D

The biggest program I've ever attempted runs to just under 6,000 lines - I say attempted, 'cos I never have got the monster working to my satisfaction ..  ::)

Just interested - we tend to assume there are no limits to program size, number of variable, subroutines .. etc - but maybe you're getting close to giving the system a nervous breakdown ..  ;D

best wishes, :)

Graham
Tomorrow may be too late ..

LarryMc

the new 2.5 IDE beta is just under 31,000 lines of code.
But I have it broken down into 52 iwb files and 9 inc files.
Otherwise I'd never be able to find any piece of code to make modifications.
It also makes recompiling and linking after a single change easy because I only have to recompile the file I changed and then relink.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Hi Larry and Graham,

This is one of two programs I want to sell, no one seems interested?

Program 1 - an anti-pornography / child safety web browser
Program 2 (the one with the problem, now fixed) - the safety settings program

okay, to be precise, the second program is 29,856 lines.

already had several breakdowns!

Anybody know where I can start to sell this?

This is the download link http://www.thesafetybrowser.com/download.htm
Would any one be good enough to try it for me?

P.S. any anti virus alerts are false positives! - I know I wrote it (took me 3 years).

Thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

GWS

Good grief Andy ..  :o .. well done you .. ;D ;D

That's brilliant, what a valiant effort.

Hope you have some success selling it.

best wishes, :)

Graham
Tomorrow may be too late ..

Andy

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.