Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
95 user(s) are online (80 user(s) are browsing Forums)

Members: 1
Guests: 94

sailor, more...

Support us!

Headlines

 
  Register To Post  

gcc how to get rid of "undefined references to"
Just can't stay away
Just can't stay away


See User information
In the source i am trying to rewrite opening all libraries (9) explicitly i did have no errors anymore only warnings i am accustomed to.
However after these warning i now get such a load of "undefined references " to all the 9 interfaces, that i can not be sure any more of these warnings.


Is there a way to redirect the output to a file or to get rid of the "undefined references"?




Go to top
Re: gcc how to get rid of "undefined references to"
Home away from home
Home away from home


See User information
@JosDuchlt
Quote:

Is there a way to redirect the output to a file or to get rid of the "undefined references"?


That 2 different problems, first one (redirect to a file), usually done via redirect brakets , but i have problems with it as well, so as result i just use KingCon buffer, and then copy+paste it to a file. And second one about "undefined references", its imho related to the mess with __USE_INLINE__ while you trying to use interfaces, or, when you not trying to use interfaces but forget about __USE_INLINE__. Or maybe just forget to add some -lsomelibrary.

Will be better if you can upload some test source somethere, so we all can have a look at this.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc how to get rid of "undefined references to"
Quite a regular
Quite a regular


See User information
@JosDuchlt

You can halt the shell output by typing anything into the shell while it is printing. Then if you are fast you should be able to see the beginning of the error output list. To continue the conpilation and printout just backspace the characters you typed.

Or do like everyone else and install KingCON

As for the interfaces; you typically need to declare them in your code, like:
struct IntuitionIFace *IIntuition;

Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Go to top
Re: gcc how to get rid of "undefined references to"
Just can't stay away
Just can't stay away


See User information
@JosDuchlt

To redirect stderr you use *> (< and > for stdin and stdout). F.e. to redirect to RAM:errors.log simply add *>RAM:errors.log to the command line.

Go to top
Re: gcc how to get rid of "undefined references to"
Just can't stay away
Just can't stay away


See User information
@salass00 splendid! A long standing frustration has gone.

@DeniiL I am using KingCON, it was just that the output flooded the buffer. Thanks for the hint of typing into the shell.


@kas1e
If i leave out the __USE_INLINE__ i have a real problem for updating this big source.


I have uploaded " the uncleaned " ("main" a small part of the) Gui4Cli source as
http://users.online.be/AD//guiNotCleaned.c
I do use -lauto to compile it, it is quite stable (only a problem when quitting, since i mostly quit Gui4Cli by closing the Amiga, it is not a big problem to me, but that's why i was looking into a proper opening and closing of the libraries to solve this)

Therefore I did clean up this part of the source as
http://users.online.be/AD/GuiGetIFce.c
which comes closer to examples (Snuffy i think) that worked for me in short programs.
(the code example in the SDK's migration guide did not : main instead of "main" in the GetInterface call)

What is peculiar(and frustrating) is that a very sloppy source not opening and closing the interfaces works with -lauto, and that when opening and closing formally the libraries and the interfaces (without -lauto) NONE of the 9 libraries seems to be reachable (undefined references to all 9 interfaces)





Go to top
Re: gcc how to get rid of "undefined references to"
Home away from home
Home away from home


See User information
Two things:

1. Warning should always be fixed. You should not get 'accustomed to them'

2. I'm 100% sure from your error description that you haven't decalred your library bases and interfaces.

eg
something like
struct Library *DosBase;
struct DOSIFace * IDOS;

must be included for each lib you 'manually open'

these declatarions are not needed with libaout.a as they are provided by it, but are needed when handling libs yourself.


[edit]

I didn't see you source code link, having looked at that I see you have delcared libray bases etc, but inside main() they must be global else you will only be able to use the library calls inside the main() function and not in any other function calls.
[/edit]




Edited by Rigo on 2011/9/13 17:21:12
Go to top
Re: gcc how to get rid of "undefined references to"
Just can't stay away
Just can't stay away


See User information
@btoadblues
Many thanks, that did it
I still had some errors, but the error messages were clear this time

//struct RexxSysLibIFace *IRexxSysLib;
//struct RexxSysLibIFace *IRexxSys;
struct RexxSysIFace *IRexxSys;
//struct DiskFontIFace *IDiskFont;
//struct DiskFontIFace *IDiskfont;
struct DiskfontIFace *IDiskfont;

struct Library *RexxSysLibBase, *DiskFontBase ;
are accepted though.



Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project