IonicWind Software

IWBasic => General Questions => Topic started by: tbohon on February 17, 2010, 08:34:32 AM

Title: Link error
Post by: tbohon on February 17, 2010, 08:34:32 AM
Have been working with some example programs found on this forum and, when compiling/linking keep getting the following error:

Error: unresolved extern _ib_main

These are (mostly) simple console programs and appear syntactically correct so I'm not sure even how to proceed.

Thoughts?

Tnx.


UPDATE:  This is now happening with all  of my CB and EB programs ... ???!!!???!!!???
Title: Re: Link error
Post by: sapero on February 17, 2010, 09:41:20 AM
_ib_main is an entry-point symbol, automatically added at the beginning of your source code when there is no project opened.
If you have opened a project, you need to put $main at the top of your main souce module:

main.eba:
$include "..."
$main /* this will generate _ib_main symbol, and here your program starts*/

...
openwindow ...

Any code before $main will be not executed, unless it is a subroutine called from code after $main.
Title: Re: Link error
Post by: ZeroDog on February 17, 2010, 05:10:25 PM
perhaps you accidently opened a new project withuot knowing... Ive done that a few times before I realized I had to close the current project before compiling a single file project.
Title: Re: Link error
Post by: tbohon on February 17, 2010, 07:42:46 PM
<sigh>

Can I just plead AARP short term memory issues and let it go?   ;D

I can be such a maroon ...

Thanks guys - I'll go take my Geritol and dust off the rocking chair, that's obviously the limit of my 'high tech' capabilities today.

Title: Re: Link error
Post by: AdrianFox on February 18, 2010, 03:49:44 AM
I wonder how many EB users have NEVER done this?  Where do you get Geritol?
:D