Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Reference error when compiling to MIPS
Reference error when compiling to MIPS [message #1802476] Sun, 10 February 2019 10:22 Go to next message
First Name is currently offline First NameFriend
Messages: 1
Registered: February 2019
Junior Member
Hello, I'm new to eclipse. I'm working on Windows 10, and my goal is to compile small and simple programs to MIPS architecture.

I'm having an issue with compiling the simplest programs that use functions references.
#include <stdio.h>
#include <stdlib.h>


int main()
{
        char *buffer = (char*)malloc(20);
}


Yields:
undefined reference to `malloc' main.c /MipsProgrma C/C++ Problem

Can someone please help me to resolve the issue?
Re: Reference error when compiling to MIPS [message #1802536 is a reply to message #1802476] Mon, 11 February 2019 16:03 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Undefined reference is a link error.
For whatever reason, stdlib was not linked when you built your executable.

Previous Topic:i have install esp32 in my eclipse c+++, but i got error when i try some example for esp32
Next Topic:Eclipse version for android development
Goto Forum:
  


Current Time: Thu Apr 18 14:12:52 GMT 2024

Powered by FUDForum. Page generated in 0.01877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top