Author Topic: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'  (Read 26761 times)

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #30 on: January 27, 2013, 06:18:45 pm »
Yes every tab has been inspected!

All I am trying to do is use a default install of Code::Blocks, hard to believe I am the only one to see this stuff.

Thanks for all of the help it is really appreciated.

Ralph

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #31 on: January 27, 2013, 07:14:12 pm »
Please attach you project filke and the default.conf from $APPDATA$\codeblocks\ , so they can be inspected to find the reason for you issue.

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #32 on: January 28, 2013, 05:50:57 pm »
The default.conf is in the project folder.

Ralph

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #33 on: January 28, 2013, 06:13:18 pm »
In looking at the default.conf I see:



Should I change that to the newer Toolchain C:\WinAVR-20100110?

Where is the -L flag set?

Ralph

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #34 on: January 28, 2013, 06:14:30 pm »
Yes every tab has been inspected!
This can not be true !
Or you have absolutely no clue of what libraries are and what a linker/compiler searchpath can be.
In this case you should read a good book/tutorial, that explains the basics of compiler/linker usage (this is not the correct website/forum for such basic stuff, sorry) and read the C::B manual.

All I am trying to do is use a default install of Code::Blocks, hard to believe I am the only one to see this stuff.
It can not be the default install, because there are several settings in the global options of the avrgcc toolchain, which are obviously wrong.

Note: neither headers (*.h), nor sources (*.c in your case) nor object files (*.o in this case) are libraries and the global linker searchdir points to the wrong compiler installation.

Offline LETARTARE

  • Regular
  • ***
  • Posts: 395
  • L'ami de l'homme.The friend of man.
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #35 on: January 28, 2013, 06:47:20 pm »
In looking at the default.conf I see an big error :
Code: [Select]
<LIBRARY_DIRS>
    <str>
        <![CDATA[C:\WinAVR-20090313\avr\lib;]]>
    </str>
</LIBRARY_DIRS>
also in "C::B" go
Quote
"Settings-> Global Variables -> Current variable"
choose "avr" then delete the contents of the box "lib", then exit and restart "C: B".
The wrong path should no longer appear in your "default.conf."
cordially.
C::B  : svn11911, wx-3.1.1, plugins : QtPregen-2.7.2-sdk146
1-Vista Business Pack 2 32bits : gcc-8.1.0,
2-OpenSuse-15.1-Leap 64bits :  gcc-7.4.1,
=> !! The messages are translated by Deepl !!

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #36 on: January 28, 2013, 08:32:27 pm »
In looking at the default.conf I see an big error :
Code: [Select]
<LIBRARY_DIRS>
    <str>
        <![CDATA[C:\WinAVR-20090313\avr\lib;]]>
    </str>
</LIBRARY_DIRS>
also in "C::B" go
Quote
"Settings-> Global Variables -> Current variable"
choose "avr" then delete the contents of the box "lib", then exit and restart "C: B".
The wrong path should no longer appear in your "default.conf."
cordially.
It's a linker search path of the avr compiler and not a global variable !

Offline LETARTARE

  • Regular
  • ***
  • Posts: 395
  • L'ami de l'homme.The friend of man.
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #37 on: January 28, 2013, 11:27:51 pm »
I think it's time for me to go to sleep !!!!
'Jens' in quite right.
In C::B go
Quote
Settings-> Compiler-> Compiler GNU AVR GCC-> Search directories-> Linker
this time you should find the old path
Quote
C:\WinAVR-20090313\avr\lib
to remove.

Sorry for the hasty response.
C::B  : svn11911, wx-3.1.1, plugins : QtPregen-2.7.2-sdk146
1-Vista Business Pack 2 32bits : gcc-8.1.0,
2-OpenSuse-15.1-Leap 64bits :  gcc-7.4.1,
=> !! The messages are translated by Deepl !!

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #38 on: January 29, 2013, 12:06:09 am »
Oh didn't I mention that not only am I new to Code::Blocks but that I hardly know what I am doing.

I just use programs I try to know as little as possible about anything.

I just do the install and then expect to use it.

The reason I have the .c,.h,and .o files in the "Linker settings" is because otherwise they are not found from my #includes.

So this works, now tell the correct way to "include" files.

Quote
In C::B go
Quote
Settings-> Compiler-> Compiler GNU AVR GCC-> Search directories-> Linker
this time you should find the old path
Quote
C:\WinAVR-20090313\avr\lib
to remove.

Nope


Quote
Yes every tab has been inspected!
This can not be true !

But it is true true I have looked at every tab, and yes it is true that I probable could know more about things
but do I really need to just to run a default install of Code::Blocks?

I am willing to bet that something about Windows 8 x64 is helping to mess things up.

But again thank you everybody for the help.

Ralph


Offline stahta01

  • Lives here!
  • ****
  • Posts: 6782
    • My Best Post
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #39 on: January 29, 2013, 01:24:30 am »
The tab Compiler IS NOT that same tab as Linker.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #40 on: January 29, 2013, 06:31:29 am »
I just use programs I try to know as little as possible about anything.
[...]
But it is true true I have looked at every tab, and yes it is true that I probable could know more about things
but do I really need to just to run a default install of Code::Blocks?

You try to do something special (embedded programming), what will (most likely) bring you much more problems, than just developping for your working system (or other pc's).

But if you state you are not willing to learn, you will never be able to do any serious programming and you are wasting the time of many other people.

I will lock this topic now and ban you for a week.
Come back if you are at least willing to find a solution yourself.