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

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
 :( I really do not know where even to begin.

I am a new user of Code:Blocks.

So far I have had a time getting my #includes "..." to work, but I have them working now.

But what about these errors:



This is using the C:\WinAVR-20090313 compiler.

Using the Atmel Toolchain I am able to build and compile my code without problems but that is using a different version of the AVR-GCC compiler.

How would I point Code:Blocks to the newer AVR-GCC compiler? Actually I cannot find the Atmel AVR Toolchain there is this notation in my Path C:\Program Files (x86)\Atmel\AVR Tools\AVR Toolchain\bin but that does not work for the Compiler's installation directory in Code:Blocks so I have to fix these undefined references problem.

Thanks for the help,
Ralph

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #1 on: January 25, 2013, 10:10:17 am »
Have you tried setting up a compiler in Settings -> Compiler?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #3 on: January 25, 2013, 06:45:08 pm »
Quote
Have you tried setting up a compiler in Settings -> Compiler?

Short answer "yes" now what?

I think that answers both of my replies, thank you.

The default installed AVR-GCC compiler gets these "undefined reference" errors pointing to the compiler libraries
nothing that I have control over.

Ralph


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #5 on: January 25, 2013, 09:29:35 pm »
Now this is just a default installation of Code:Blocks.

The problem is with the installation of Code:Blocks.

I guess my first thing to do would be to re-install code blocks.

I take it this is not a common error.

Ralph

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #6 on: January 25, 2013, 09:49:48 pm »
I re downloaded Code:Blocks and re-installed!!

I am still getting the same undefined reference to '__mulhi3' .



Now this isn't just a undefined reference to one of my libraries this is a compiler library!!

There definitely is a problem with the Windows 8 x64 install.

Ralph

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #7 on: January 25, 2013, 11:03:52 pm »
FYI: I am 99.99 % sure the problem is a Compiler or CB Toolchain configuration issue.

http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Compiler-neutral_setup_steps

Feel free to keep re-installing Code::Blocks; it won't fix this problem.

You do not seen wish my help, so goodbye.

Tim S.
« Last Edit: January 25, 2013, 11:06:30 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #8 on: January 25, 2013, 11:05:24 pm »
Have you tried to build from the command line? Does it work there?

Posting screen shots of the result is useless. Look at the "Build log" for clues.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #9 on: January 25, 2013, 11:44:45 pm »
Quote
If you installed the compiler on its default installation directory, there is nothing more to configure. Launch Code::Blocks and you 're all set :)
no I am not!!

I appreciate all of your help and I am trying to apply your help.

How do you run the Code:Blocks compiler from the command line.

I run fine from the command line but that is using a different compiler gcc version 4.3.2 (WinAVR 20090313).

Where is the build log? Like I said I am brand new to Code:Blocks.

Ralph

« Last Edit: January 25, 2013, 11:47:17 pm by Ralphxyz »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #10 on: January 25, 2013, 11:52:35 pm »
How do you run the Code:Blocks compiler from the command line.
http://wiki.codeblocks.org/index.php?title=FAQ-General#Q:_What_Code::Blocks_is_not.3F

Have you setup C::B to use the correct compiler?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #11 on: January 26, 2013, 01:17:15 pm »
Can you post the full buildlog? Mmcu must be defined the same for compile and link phase.

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #12 on: January 26, 2013, 06:42:15 pm »
Quote
Have you setup C::B to use the correct compiler?

I have not setup anything!! I just did a install. Actually I have hit the Auto-detect button a couple of times:


Quote
Can you post the full buildlog? Mmcu must be defined the same for compile and link phase.

Again where is the build log?

Thanks for the help.

Are others running Windows 8 x64?

Ralph

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #13 on: January 26, 2013, 06:52:31 pm »
Again where is the build log?

Are you kidding ?
You have posted a screen shot, that shows a tab, that is named "Build log".
It might help to click on the tab, even if there are other ways to reach it.

Offline Ralphxyz

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: undefined reference to '__mulhi3' In function 'vfprintf': and 'calloc'
« Reply #14 on: January 26, 2013, 07:08:04 pm »
Sorry I was not looking at anything but the error message.

Speaking of which the screen shot I posted essentially says the same thing as the the Build Log, which I have finally seen.



Ralph