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

Author Topic: Can not set up Code::blocks propeprly for SFML  (Read 1654 times)

0 Members and 1 Guest are viewing this topic.

Sahil

  • Newbie
  • *
  • Posts: 2
    • View Profile
Can not set up Code::blocks propeprly for SFML
« on: August 16, 2012, 07:35:03 am »
It's my very first post here. So here is my problem. I did exactly same things as shown in tutorial for 2.0 on code::blocks and got this build log


-------------- Build: Debug in SFML ---------------

Linking console executable: bin\Debug\SFML.exe
Info: resolving sf::RenderStates::Default      by linking to __imp___ZN2sf12RenderStates7DefaultE (auto-import)
Info: resolving vtable for sf::Textby linking to __imp___ZTVN2sf4TextE (auto-import)
Info: resolving vtable for sf::VertexArrayby linking to __imp___ZTVN2sf11VertexArrayE (auto-import)
obj\Debug\main.o(.text$_ZN2sf4TextD1Ev[sf::Text::~Text()]+0x3a): In function `ZN2sf8DrawableD0Ev':
H:/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h: variable 'vtable for sf::Text' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
obj\Debug\main.o(.text$_ZN2sf4TextD1Ev[sf::Text::~Text()]+0x46):H:/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h: variable 'vtable for sf::Text' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
obj\Debug\main.o(.text$_ZN2sf11VertexArrayD1Ev[sf::VertexArray::~VertexArray()]+0x3a):H:/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h: variable 'vtable for sf::VertexArray' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

-------------- Build: Release in SFML ---------------

Compiling: main.cpp
Linking console executable: bin\Release\SFML.exe
Info: resolving vtable for sf::Textby linking to __imp___ZTVN2sf4TextE (auto-import)
Info: resolving vtable for sf::VertexArrayby linking to __imp___ZTVN2sf11VertexArrayE (auto-import)
Info: resolving sf::RenderStates::Default      by linking to __imp___ZN2sf12RenderStates7DefaultE (auto-import)
obj\Release\main.o(.text+0x3ea):main.cpp: variable 'vtable for sf::Text' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
obj\Release\main.o(.text+0x3ef):main.cpp: variable 'vtable for sf::Text' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
obj\Release\main.o(.text+0x65a):main.cpp: variable 'vtable for sf::Text' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
obj\Release\main.o(.text+0x65f):main.cpp: variable 'vtable for sf::Text' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
obj\Release\main.o(.text+0x400):main.cpp: variable 'vtable for sf::VertexArray' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
obj\Release\main.o(.text+0x670):main.cpp: variable 'vtable for sf::VertexArray' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
6 errors, 0 warnings
 
I have windows 7 and latest version of code::blocks. I've been working with SDL laltely and it worked fine, so with allegro but SFML seems easier than both but due to some reasons I can't run it properly. What could be the reason?
 


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Can not set up Code::blocks propeprly for SFML
« Reply #1 on: August 16, 2012, 08:01:30 am »
Can you upload (or copy) your project file here?
Laurent Gomila - SFML developer

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Can not set up Code::blocks propeprly for SFML
« Reply #2 on: August 16, 2012, 09:22:52 pm »
Your GCC (3.4.2) dates back to 2004... That's 8 years ago and a few generations in computing terms...

You should seriously consider upgrading your build environment (MinGW). Code::Blocks is known to not update their binary installation files very frequently and so it is recommended you upgrade MinGW separately of Code::Blocks. You might consider using this.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Sahil

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Can not set up Code::blocks propeprly for SFML
« Reply #3 on: August 19, 2012, 08:24:45 am »
But how do I update Mingw alone?

TheVirtualDragon

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Control + Alt + Delete!
Re: Can not set up Code::blocks propeprly for SFML
« Reply #4 on: August 19, 2012, 12:21:22 pm »
Unless I have forgotten, I think you have to download MinGW seperately and then tell CodeBlocks where the new MinGW is (in compile options).