Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - redavni

Pages: [1]
1
General / Undefined Reference Issues
« on: December 20, 2011, 02:58:13 pm »
Hi, new here and running into some annoying issue when running a very basic test on SFML.

OK, first off here's my code:

Code: [Select]
#include <iostream>
#include <SFML/System.hpp>

using namespace std;

int main()
{
    sf::Clock clck;
    cout << "built?!" << endl;
    return 0;
}


And the error I get is
Code: [Select]
obj\Debug\main.o||In function `main':
C:\Users\Jake\Desktop\test\main.cpp|8|undefined reference to `_imp___ZN2sf5ClockC1Ev'
=== Build finished: 1 errors, 0 warnings ===


And now a breakdown of my setup to help clarify. I am using SFML 1.6 on windows with code::blocks 10.05. I installed the latest mingw earlier today. Tested simple c++ programs to make sure everything was good, no problem.

I am linking dynamically, using a Debug build target.
So in Settings->Compiler and Debugger->Search Directories->Compiler I have 'D:\libraries\SFML-1.6\include
Linker: D:\libraries\SFML-1.6\lib

Moving on to project build options. Compiler settings -> defines: I have SFML_DYNAMIC.
Linker Settings-> Other linker options: -lsfml-system-d
And finally I have copied sfml-system-d.dll to the Debug folder of my project.

Hope that's clear enough to avoid any of the basic questions about following the tutorial. Any help would be appreciated.

Pages: [1]
anything