Codeblocks linking error

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
natty5
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Jul 05, 2018 7:35 am

Codeblocks linking error

Post by natty5 »

I already changed my linker settings to change the library, reinstalled wxWidgets, and restarted my computer just in case it was still running. Why amd I still getting this error?

Code:

Code: Select all

#include <iostream>
#include <string>
using namespace std;

class List
{
struct Node
{
  int data;
  Node * next;
};

Node * head;

public:
List()
{
  head = NULL;
}

~List()
{
  // delete the list
  while(head != NULL)
  {
   Node * n = head->next;
   delete head;
   head = n;
  }
}

void add(int value)
{
  Node * n = new Node;
  n->data = value;
  n->next = head;
  head = n;
}

void show()
{
  while(head !=NULL)
  {
   Node * n = head->next;
   cout<< head->data <<", ";
   head = n;
  }
  cout << endl;
}
};

int main()
{
List MyList;

MyList.add(5);
MyList.add(12);
MyList.add(24);
MyList.add(32);
MyList.add(47);
MyList.add(54);
MyList.add(65);

MyList.show();

system("pause");
return 0;
}
The specific error is attached
Attachments
Error
Error
Capture.PNG (29.26 KiB) Viewed 580 times
Last edited by doublemax on Thu Jul 05, 2018 9:09 am, edited 1 time in total.
Reason: Added code tags
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Codeblocks linking error

Post by doublemax »

I don't see any wxWidgets classes in the code you posted, only in the linker error.
I also don't see "testframe" in the code. Where is it used?
Use the source, Luke!
Post Reply