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

Author Topic: I'm new and I need help setting up my compiler.  (Read 1725 times)

0 Members and 1 Guest are viewing this topic.

greenleaf800073

  • Newbie
  • *
  • Posts: 37
    • View Profile
I'm new and I need help setting up my compiler.
« on: November 07, 2013, 02:15:44 am »
Hi, I'm new to SFML and I need some help setting up my compiler, it's Code::Blocks 12.11 and I have SFML 2.1.

I looked at the tutorial page: http://www.sfml-dev.org/tutorials/2.1/start-cb.php
but I can't seem to do it

For link libraries, I put the path of the files, not just the names because if I don't, then I says that it can't find it, am I supposed to do this?

For Search directories, compiler, I've put the path to SFML-2.1\include and for linker, I've put the path to SFML-2.1\lib.

The error messages I'm getting are:
obj\Debug\main.o||In function `main':|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|5|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|5|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|6|undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|7|undefined reference to `_imp___ZN2sf5Color5GreenE'
|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|7|undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|15|undefined reference to `_imp___ZN2sf6Window5closeEv'
|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|12|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|18|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'
|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|18|undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'
|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|20|undefined reference to `_imp___ZN2sf6Window7displayEv'
|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|9|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Users\cocon_000\Desktop\SFML Projects\SFMLtests\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
|
obj\Debug\main.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\Users\cocon_000\Desktop\SFML-2.1\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'
|
C:\Users\cocon_000\Desktop\SFML-2.1\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\Users\cocon_000\Desktop\SFML-2.1\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'
|
||=== Build finished: 20 errors, 0 warnings (0 minutes, 0 seconds) ===|
 


By the way, hi :D

The Hatchet

  • Full Member
  • ***
  • Posts: 135
    • View Profile
    • Email
Re: I'm new and I need help setting up my compiler.
« Reply #1 on: November 07, 2013, 02:55:49 am »
Redo the setup tutorial.  READ EVERYTHING on that page, all the black text, red text, picture text, text text.  READ EVERYTHING!  Your errors are linker errors but all can be resolved if you start fresh and follow all the direction on the C::B setup page. 

I have followed that setup tutorial numerous times across multiple machines and as long as I do it all works fine.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: I'm new and I need help setting up my compiler.
« Reply #2 on: November 07, 2013, 01:17:27 pm »
If following the tutorial again doesn't solve your problem, follow:
http://en.sfml-dev.org/forums/index.php?topic=12552.0
and post the complete build log here.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).