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.


Messages - redavni

Pages: [1]
1
General / Undefined Reference Issues
« on: December 20, 2011, 04:14:22 pm »
Gave it a shot with the same project (updating gcc to the one you mentioned) and a fresh one, exact same error.

2
General / Undefined Reference Issues
« on: December 20, 2011, 03:41:13 pm »
My mistake, I hadn't saved the file. Here's the updated version.

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="test" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin\Debug\test" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Debug\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
<Add option="-DSFML_DYNAMIC" />
</Compiler>
<Linker>
<Add option="-lsfml-system-d" />
</Linker>
</Target>
<Target title="Release">
<Option output="bin\Release\test" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="main.cpp" />
<Extensions>
<code_completion />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

3
General / Undefined Reference Issues
« on: December 20, 2011, 03:06:18 pm »
Here you go

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="test" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin\Debug\test" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Debug\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin\Release\test" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="main.cpp" />
<Extensions>
<code_completion />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

4
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