Dodanie bilioteki sfml do code:blocks
Ostatnio zmodyfikowano 2016-08-08 22:11
Banneq Temat założony przez niniejszego użytkownika |
» 2016-08-07 20:37:31 wszystkie dlki sa tam gdzie powinny |
|
mateczek |
» 2016-08-07 21:46:22 Przy instalacji 2.0 wyskakuje błąd krytyczny z następującą treścią
|
instalacji czego ?? co ty tam instalujesz?? bibliotekę masz spakowaną w wersji binarnej, lub pobierasz źródła i kompilujesz !!! na Ubuntu to sprawa banalna sudo apt-get install libsfml-dev
tylko tyle wystarczy by zacząć programowanie. Co innego Windows. Tu trzeba się pomęczyć z kompilacją, lub dopasować wersję biblioteki do kompilatora. |
|
Banneq Temat założony przez niniejszego użytkownika |
» 2016-08-07 22:49:23 Lecimy dalej. Zrobiłem wszystko od początku i elo
||=== Build: Debug in sfml (compiler: GNU GCC Compiler) ===| obj\Debug\main.o||In function `main':| D:\sfml\main.cpp|6|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'| D:\sfml\main.cpp|6|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'| D:\sfml\main.cpp|6|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'| D:\sfml\main.cpp|7|undefined reference to `_imp___ZN2sf5ClockC1Ev'| D:\sfml\main.cpp|14|undefined reference to `_imp___ZN2sf6Window5closeEv'| D:\sfml\main.cpp|11|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'| D:\sfml\main.cpp|17|undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'| D:\sfml\main.cpp|17|undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'| D:\sfml\main.cpp|19|undefined reference to `_imp___ZNK2sf5Clock14getElapsedTimeEv'| D:\sfml\main.cpp|19|undefined reference to `_imp___ZNK2sf4Time9asSecondsEv'| D:\sfml\main.cpp|19|undefined reference to `_imp___ZNK2sf12RenderWindow7getSizeEv'| D:\sfml\main.cpp|19|undefined reference to `_imp___ZNK2sf12RenderWindow7getSizeEv'| D:\sfml\main.cpp|19|undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'| D:\sfml\main.cpp|20|undefined reference to `_imp___ZNK2sf11CircleShape9getRadiusEv'| D:\sfml\main.cpp|20|undefined reference to `_imp___ZNK2sf11CircleShape9getRadiusEv'| D:\sfml\main.cpp|20|undefined reference to `_imp___ZN2sf13Transformable9setOriginERKNS_7Vector2IfEE'| D:\sfml\main.cpp|21|undefined reference to `_imp___ZNK2sf12RenderWindow7getSizeEv'| D:\sfml\main.cpp|21|undefined reference to `_imp___ZNK2sf12RenderWindow7getSizeEv'| D:\sfml\main.cpp|21|undefined reference to `_imp___ZN2sf13Transformable11setPositionEff'| D:\sfml\main.cpp|22|undefined reference to `_imp___ZN2sf5Color6YellowE'| D:\sfml\main.cpp|22|undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'| D:\sfml\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'| D:\sfml\main.cpp|23|undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'| D:\sfml\main.cpp|25|undefined reference to `_imp___ZN2sf6Window7displayEv'| D:\sfml\main.cpp|8|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'| D:\sfml\main.cpp|27|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'| D:\sfml\main.cpp|27|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'| D:\sfml\main.cpp|27|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'| obj\Debug\main.o||In function `ZN2sf11CircleShapeD1Ev':| D:\SFML-2.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'| D:\SFML-2.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZTVN2sf11CircleShapeE'| D:\SFML-2.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `_imp___ZN2sf5ShapeD2Ev'| ||error: ld returned 1 exit status| ||=== Build failed: 32 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
|
|
marcolo2307 |
» 2016-08-07 23:23:58 |
|
Banneq Temat założony przez niniejszego użytkownika |
» 2016-08-08 08:27:50 Teraz: "Aplikacja nie została właściwie uruchomiona (0xc000007b). Zmieniłem uruchamianie na GUI. |
|
mateczek |
» 2016-08-08 10:15:54 Nie wiem czy tylko ja ma problemy ze zrozumieniem tego co piszesz ?? Ale skoro ja mam, to pewnie i inni. Być może dlatego masz problem z uzyskaniem pomocy !!!
Kilka pytań!!!! 1. Jaka wersja kompilatora?? środowiska ?? dokładne dane !!! 2. Skąd pobrałeś bibliotekę ?? jaka wersja ?? dokładne dane!!! 3. czy katalog "bin" biblioteki dodany do zmiennej path?? ta operacja rozwiąże Ci problem z kopiowaniem dll-ek będą po prostu dostępne w systemie !!! 4. wklej kod programu, który usiłujesz skompilować!!!
Jeśli nie zaczernisz pisać konkretami to nie dostaniesz konkretnej odpowiedzi !!! |
|
Banneq Temat założony przez niniejszego użytkownika |
» 2016-08-08 11:43:09 1. Code Blocks 16.01 rev 10702 SDK Version: 1.29.0 2. http://www.sfml-dev.org/download/sfml/2.0/ Wersja 64-bit 3. Jestem zielony w tym temacie, nie wiem jak to zrobić. 4. Próbuję odtworzyć kod zaproponowany przez kurs: #include <SFML/Graphics.hpp> #include <cmath>
int main() { sf::RenderWindow okno( sf::VideoMode( 320, 240 ), "Kurs SFML 2.0 - http://cpp0x.pl" ); sf::Clock stoper; while( okno.isOpen() ) { sf::Event event; while( okno.pollEvent( event ) ) { if( event.type == sf::Event::Closed ) okno.close(); } okno.clear(); sf::CircleShape ksztalt( std::sin( stoper.getElapsedTime().asSeconds() ) * okno.getSize().y / 8 + okno.getSize().y / 4 ); ksztalt.setOrigin( sf::Vector2f( ksztalt.getRadius(), ksztalt.getRadius() ) ); ksztalt.setPosition( okno.getSize().x / 2.0f, okno.getSize().y / 2.0f ); ksztalt.setFillColor( sf::Color::Yellow ); okno.draw( ksztalt ); okno.display(); } return 0; } Znowu wyskakuje informacja o złym zalinkowaniu, ale jestem pewien, że zrobiłem to jak należy. |
|
marcolo2307 |
» 2016-08-08 12:49:46 Korzystaj z SFML 2.0 32-bit, GCC TDM. |
|
1 « 2 » 3 |