Re: MinGW-users Digest, Vol 32, Issue 32

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: MinGW-users Digest, Vol 32, Issue 32

max reason

> Date: Sat, 31 Jan 2009 16:00:39 +0000 (UTC)
> From: Tony Richardson <[hidden email]>
> Subject: Re: [Mingw-users] mingw on CodeBlocks
> To: [hidden email]
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
> Tony Richardson <richardson@...> writes:
>> max reason <maxreason@...> writes:
> Part of problem description pruned from original posting.
>>>  #2: many "undefined references" to functions in .s file:
>>>      A: undefined reference to '_math_sin'
> More pruning.
>>>  Thanks.  Max
> It looks as if "_aligned_malloc" problem (reported in a different
> thread) might also be due to a missing underscore?  Did you notice
> the undefined reference to "__aligned_malloc" has two leading
> underscores?  You will need both underscores in the assembly
> source definition.
> Tony Richardson

 I'm not sure whether I am mixing up threads here, but to
 avoid any confusions, I hereby confirm what Tony noticed:
 the error message contains '__aligned_malloc' with two
 leading underline characters.  The function itself, as
 listed in the mingw <malloc.h> header is '_aligned_malloc'
 with one leading underline character.

 To further [over]-clarify, I prepended an underscore to
 my assembly language functions, which solved the many
 references to undefined symbols in my assembly language.
 However, _aligned_malloc is a win32 API function, not in
 my assembly language files, and these errors occur where
 my C/C++ code is calling this normal win32 API function.

 One additional comment too many from ignorant/stupid me:
 If some code in the mingw package tries to detect and
 correct "errors" in the number of leading underlines in
 symbols it finds, this might cause problems on functions
 that actually DO have leading underline characters in
 the original source code text.  While I doubt mingw or
 gcc toolsets contain any such attempts to guess/correct,
 I mention this "just in case".  Thanks Tony & others.

This email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:

This list observes the Etiquette found at
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) HTML/MIME encoded mail
3) Improper quoting
4) Improper trimming