Qbasicnews.com

Full Version: Alternate entry-point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
v1c, when I tried specifying an alternate entry-point in my fb module, fbc told me it couldn't find it. Is it telling my this because it requires some undocumented aruguements?

Gimmie an example, pls.
The -entry option will only work if you have defined a label in ASM or C or a different language, it won't change the name of the entry-point, it will pass to LD a different one than the default.
So I can stick a bit of inline asm in to mark a label?

ie:
Code:
'' stuff up here

Sub MyEntryPoint ()
Asm
   asmMyEntryPoint:
End Asm

   '' Stuff to do

End Sub

'' More stuff here

And compile using -entry asmMyEntryPoint?
Declaring as a proc will be enough:

Code:
sub foo cdecl alias "foo"

    print "no std entry-point called!"
    
    end 0

end sub

Code:
fbc test.bas -entry _foo

END() has to be explicitly called or the proc would return to nowhere..
Yeah, I always end my programs with END anyway.

But, I didn't think of the underscore requirement.

Damn you and your not adding that inherently!
This:
Code:
fbc test.bas -entry foo
would be more basic... :wink: