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 - Seven

Pages: [1]
1
General / Re: Build fails; 'undefined reference to..'
« on: October 21, 2013, 11:39:10 pm »
YYYYYYYYYYYEEEEEEEEEEEEEEEEEEEEEEESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS!  ;D
I just re-downloaded SFML, and switched from the installed MinGW to the version supplied by CodeBlocks, and it works!
Thank you everyone, sorry for troubling you, and may I commend you on your excellent support.

Thanks a million,
Seven

2
General / Re: Build fails; 'undefined reference to..'
« on: October 21, 2013, 11:11:37 pm »
MinGW; 4.8.1
SFML; 2.1
(Also, libgcc_s_dw2-1.dll if that helps)

Edit: 2.1, not 1.2

3
General / Re: Build fails; 'undefined reference to..'
« on: October 21, 2013, 10:50:49 pm »
Follow this: http://en.sfml-dev.org/forums/index.php?topic=12552.0

Rebuild your project (not just build) and paste the complete output here.

-------------- Clean: Debug in test-sfml (compiler: GNU GCC Compiler)---------------

Cleaned "test-sfml - Debug"

-------------- Build: Debug in test-sfml (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall  -g    -IC:\SFML-2.1\include  -c N:\Programming\C++\Projects\test-sfml\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LC:\SFML-2.1\lib  -o bin\Debug\test-sfml.exe obj\Debug\main.o    -lsfml-network-d -lsfml-audio-d -lsfml-graphics-d -lsfml-window-d -lsfml-system-d -lopengl32
obj\Debug\main.o: In function `main':
N:/Programming/C++/Projects/test-sfml/main.cpp:5: undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
N:/Programming/C++/Projects/test-sfml/main.cpp:5: undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
N:/Programming/C++/Projects/test-sfml/main.cpp:5: undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
N:/Programming/C++/Projects/test-sfml/main.cpp:6: undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'
N:/Programming/C++/Projects/test-sfml/main.cpp:7: undefined reference to `_imp___ZN2sf5Color5GreenE'
N:/Programming/C++/Projects/test-sfml/main.cpp:7: undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'
N:/Programming/C++/Projects/test-sfml/main.cpp:15: undefined reference to `_imp___ZN2sf6Window5closeEv'
N:/Programming/C++/Projects/test-sfml/main.cpp:12: undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'
N:/Programming/C++/Projects/test-sfml/main.cpp:18: undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'
N:/Programming/C++/Projects/test-sfml/main.cpp:18: undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'
N:/Programming/C++/Projects/test-sfml/main.cpp:19: undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'
N:/Programming/C++/Projects/test-sfml/main.cpp:19: undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
N:/Programming/C++/Projects/test-sfml/main.cpp:20: undefined reference to `_imp___ZN2sf6Window7displayEv'
N:/Programming/C++/Projects/test-sfml/main.cpp:9: undefined reference to `_imp___ZNK2sf6Window6isOpenEv'
N:/Programming/C++/Projects/test-sfml/main.cpp:23: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
N:/Programming/C++/Projects/test-sfml/main.cpp:23: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
N:/Programming/C++/Projects/test-sfml/main.cpp:23: undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
obj\Debug\main.o: In function `ZN2sf11CircleShapeD1Ev':
C:/SFML-2.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `_imp___ZTVN2sf11CircleShapeE'
C:/SFML-2.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `_imp___ZTVN2sf11CircleShapeE'
C:/SFML-2.1/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `_imp___ZN2sf5ShapeD2Ev'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
20 errors, 0 warnings (0 minutes, 2 seconds)
 

-SNIP-
I tried this, resulted in the same error messages. Thanks anyway.

4
General / Re: Build fails; 'undefined reference to..'
« on: October 21, 2013, 05:42:30 pm »
Those errors mean you aren't linking to the libraries correctly.  Reread the tutorial carefully.
I've just reread the tutorial twice and reconfigured everything, and I still have no luck.
Could you please expand if possible? If you need any information from me I'll post code/screenshots.



Thanks for your help and quick replies!

5
General / Build fails; 'undefined reference to..'
« on: October 20, 2013, 11:25:27 pm »
Hello!
I've just finished installing SFML using the tutorial on the Wiki, and I've tried to run the code posted at the end of the tutorial. After clicking build, the error log throws this in my face;

obj\Debug\main.o||In function `main':|
N:\Programming\C++\Projects\test-sfml\main.cpp|5|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'|
N:\Programming\C++\Projects\test-sfml\main.cpp|5|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
N:\Programming\C++\Projects\test-sfml\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
N:\Programming\C++\Projects\test-sfml\main.cpp|6|undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'|
N:\Programming\C++\Projects\test-sfml\main.cpp|7|undefined reference to `_imp___ZN2sf5Color5GreenE'|
N:\Programming\C++\Projects\test-sfml\main.cpp|7|undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'|
N:\Programming\C++\Projects\test-sfml\main.cpp|15|undefined reference to `_imp___ZN2sf6Window5closeEv'|
N:\Programming\C++\Projects\test-sfml\main.cpp|12|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
N:\Programming\C++\Projects\test-sfml\main.cpp|18|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'|
N:\Programming\C++\Projects\test-sfml\main.cpp|18|undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'|
N:\Programming\C++\Projects\test-sfml\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'|
N:\Programming\C++\Projects\test-sfml\main.cpp|19|undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'|
N:\Programming\C++\Projects\test-sfml\main.cpp|20|undefined reference to `_imp___ZN2sf6Window7displayEv'|
N:\Programming\C++\Projects\test-sfml\main.cpp|9|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
N:\Programming\C++\Projects\test-sfml\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
N:\Programming\C++\Projects\test-sfml\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
N:\Programming\C++\Projects\test-sfml\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
obj\Debug\main.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'|
C:\SFML\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'|
||=== Build finished: 20 errors, 0 warnings (0 minutes, 1 seconds) ===|
 

I have no idea what to do, a Google search appears with next to no results and I tried searching these forums but got a database error (just my luck!)
Information; running SFML 2.1 on Code::Blocks, and I'm using Windows 7. I've tried changing from the Code::Blocks MinGW to a full MinGW install directory but still nothing.

Any help?

Pages: [1]