Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attempt to use linked source files/objects fails. . .
#1
With my luck, this is probably just a problem with keywords. . .

I've compiled 2 source files that decode/encode strings into base64, which are right now object files (decode.o and encode.o). The problem I'm having is linking those object files to the main program which allows you to select whether you want to encode a string in base64 or decode a string from base64 (this is actually what calls those programs).

This example simplifies the problem:
Code:
'*** snippit from "menu.bas" ***
IF INKEY$ = "1" THEN
    CHAIN "encode" 'this is within the executable. . .
ELSEIF INKEY$ = "2" THEN
    CHAIN "decode" 'this is also within the executable. . .
ELSEIF INKEY$ = CHR$(27) THEN
    END
END IF

To simplify my question, how do I transfer control to linked program that resides within the main executable, if this is possible? If this is not possible, is there another way other than compiling each one and including all 3 files in a ZIP file (for easier portability)?

I hope somebody can help!
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)
Reply
#2
Correct me if i'm wrong but why do'nt you make 2 sub's or 2 functions in the program menu.bas?
I suppose you have encode.bas and decode.bas!

or

Do you only have the object files decode.o and encode.o?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)