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.


Topics - c-jay

Pages: [1]
1
C / How to release a sfml-program for several distribution?
« on: August 20, 2016, 11:16:20 am »
Hi, my project of coding some stuff with sfml is in the final state.
Now I like to build a release for students but I'm very new to cmake/ make .

Do anybody know a good tutorial or bool to release an C-program, based on SFML/CSFML 2.3 to another machine like Ubuntu 14.04 ?

Thank you very much

2
C / final link failed, hidden symbol `__cpu_model'
« on: August 18, 2016, 09:48:21 pm »
Hi, after updating (C)SFML I get an known error but the known solution with -l gcc_s -l gcc didn't work any more :(

Building target: TEST
Invoking: Cross GCC Linker
g++ -L/home/user/Programme/CSFML_build/lib -L/home/user/Programme/SFML_build/lib -o "TextFS"  ./src/dir.o ./src/gen_tfs.o ./src/iname.o ./src/init_tfs.o ./src/inode.o ./src/main.o ./src/read_from_fs.o ./src/sf_Inodes.o ./src/sf_buttons.o ./src/sf_functions.o ./src/sfml.o ./src/spec_tfs.o ./src/utils.o ./src/write_to_fs.o   -lcsfml-window -lsfml-window -lcsfml-graphics -lsfml-graphics -lcsfml-system -lsfml-system -lgcc_s -lgcc
/usr/bin/ld: warning: libsfml-window.so.2.3, needed by /home/user/Programme/CSFML_build/lib/libcsfml-window.so, may conflict with libsfml-window.so.2.4
/usr/bin/ld: warning: libsfml-graphics.so.2.3, needed by /home/user/Programme/CSFML_build/lib/libcsfml-graphics.so, may conflict with libsfml-graphics.so.2.4
/usr/bin/ld: TEST: hidden symbol `__cpu_model' in /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a(cpuinfo.o) is referenced by DSO
/usr/bin/ld: final link failed: Ungültiger Wert
collect2: error: ld returned 1 exit status

I'm very thankful for every help

3
General / Could NOT find SFML missing LIBRARY
« on: August 14, 2016, 05:24:17 pm »
Hi, I have written a little program using sfml. Now I like to install it on a fresh Ubuntu 16.01 with cmake/make but i get an error which I don' get fixed.

chris@Ubuntu-PC:~/Programme/sfml-build$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -DCMAKE_BUILD_TYPE=release ../sfml
CMake Error at FindSFML.cmake:359 (message):
    Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY      
    SFML_NETWORK_LIBRARY SFML_GRAPHICS_LIBRARY SFML_AUDIO_LIBRARY)
 

I tried some solutions like setting the  SFML_ROOT but it doesn't work. Do I have to set it to the header direcory or to another directory?

If you need more details I will post it next time

4
Hi,

after updating Ubuntu 14.01 to Ubuntu 16.01 xenial with KDE 4.14 I get this terminal error :

root@PC-Ubuntu:/home/user/test# ./TEST
Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
 

If i run the code in Eclipse the window open correctly.

Some additional Informaion:
root@PC-Ubuntu:/home/user/test# echo $DISPLAY
localhost:10.0

root@PC-Ubuntu:/home/user/test# grep X /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10
 
Any idea how to fix?


5
C / Eclipse: undefined reference
« on: August 10, 2016, 07:51:48 pm »
Hi,

after updating ubuntu to 16.04 xenial and sfml cmake + make and csfml cmake + make i get the following failure in Eclipse

 Nicht definierter Verweis auf == undefined reference to
19:41:37 **** Incremental Build of configuration Debug for project TEST ****
make all
Building target: TEST
Invoking: Cross GCC Linker
gcc -L/home/user/Programme/SFML_build/lib -o "TEST"  ./src/dir.o ./src/gen_tfs.o ./src/iname.o ./src/init_tfs.o ./src/inode.o ./src/main.o ./src/read_from_fs.o ./src/sf_Inodes.o ./src/sf_buttons.o ./src/sf_functions.o ./src/sfml.o ./src/spec_tfs.o ./src/utils.o ./src/write_to_fs.o   -lcsfml-graphics -lpthread -lcsfml-system -lcsfml-window
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Texture::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Rect<int> const&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Shader::Type)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Vector2<float> const&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float, float, float, float)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::loadFromMemory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Shader::Type)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Texture const&)'
makefile:30: die Regel für Ziel "TEST" scheiterte
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Vector3<float> const&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Font::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float, float)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Font::getGlyph(unsigned int, unsigned int, bool) const'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Image::saveToFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-window.so: Nicht definierter Verweis auf `sf::String::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >[abi:cxx11]() const'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Shader::CurrentTextureType)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Color const&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Transform const&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::setParameter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float, float, float)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::String::toAnsiString[abi:cxx11](std::locale const&) const'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Shader::loadFromMemory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcsfml-graphics.so: Nicht definierter Verweis auf `sf::Image::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make: *** [TEST] Fehler 1

i'm very thankful for every solution

6
C / CMAKE failure
« on: August 09, 2016, 09:49:31 pm »
Hi,

i'd like to generate build files with cmake. It generates this failure:

CMake Error at src/SFML/CMakeLists.txt:28 (find_package):
  By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "SFML", but
  CMake did not find one.

  Could not find a package configuration file provided by "SFML" (requested
  version 2) with any of the following names:

    SFMLConfig.cmake
    sfml-config.cmake

  Add the installation prefix of "SFML" to CMAKE_PREFIX_PATH or set
  "SFML_DIR" to a directory containing one of the above files.  If "SFML"
  provides a separate development package or SDK, be sure it has been
  installed.

I don't understand the reported solutions:
1) Where is the CMAKE_MODULE_PATH to put the "FindSFML.cmake" into?
2) How could i add the installation prefix of "SFML" to CMAKE_PREFIX_PATH?
3) Where are the directory of the files SFMLConfig.cmake and sfml-config.cmake?

I am very thankful for every solution.

7
C / set up Eclipse CDT for CSFML, error while loading shared libraries
« on: April 26, 2016, 07:50:14 pm »
Hi,

I use Kubuntu 14.04, Eclipse CDT and like to include CSFML which generate this error:

/home/u123/Programme/TestProg/Debug/TestProg: error while loading shared libraries: libcsfml-graphics.so.2.2: cannot open shared object file: No such file or directory
 

My Eclipse settings:

Environment variable: LD_LIBRARY_PATH = /home/u123/Programme/TestpProg/sfmlStuff/SFML-2.2/lib
Compiler Symbols: CSFML_STATIC
Compiler Includes: /home/u123/Programme/TestpProg/sfmlStuff/SFML-2.2/include
                   /home/u123/Programme/TestpProg/sfmlStuff/CSFML-2.2/include
Linker libraries: csfml-audio
                  csfml-system
                  csfml-graphics
                  csfml-window
Linker search paths: /usr/local/lib
                     /home/u123/Programme/TestpProg/sfmlStuff/SFML-2.2/lib
                     /home/u123/Programme/TestpProg/sfmlStuff/CSFML-2.2/lib
 

output of ldd:
christian@PC-Ubuntu:~$ ldd /home/u123/Programme/TestpProg/Debug/TestpProg
        linux-vdso.so.1 =>  (0x00007ffc4999c000)
        libcsfml-graphics.so.2.2 => not found
        libcsfml-window.so.2.2 => not found
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f201ab19000)
        /lib64/ld-linux-x86-64.so.2 (0x000056380a1a0000)
 

Any ideas into where the problem lies? Thanks.

8
C / sfFloatRect_set function
« on: April 26, 2016, 03:24:47 pm »
Hi this works fine:

#include <SFML/Graphics.h>

sfVector2f sfVector2f_set(float x, float y){
        sfVector2f vector2f;

        vector2f.x = x;
        vector2f.y = y;

        return vector2f;
}

int main(){
sfVector2f vector;
vector.x = sfVector2f_set(1, 1).x;
}
 
But this throws error: request for member top in something not a structure or union
#include <SFML/Graphics.h>
sfFloatRect sfFloatRect_set(float top, float left, float width, float height){
        sfFloatRect floatRect;

        floatRect.top = top;
        floatRect.left = left;
        floatRect.width = width;
        floatRect.height = height;

        return floatRect;
}

int main(){
sfFloatRect floatRect;

// throws error: request for member top in something not a structure or union      
floatRect.top = sfFloatRect_set(1,1,1,1).top;              
                                                       
}
 

I think it could be a basic c problem but i'm very thankful for a reason.

9
C / sfRenderWindow as function argument
« on: April 26, 2016, 12:20:14 pm »
Hi,

this works fine:

#include <SFML/Graphics.h>
#define SCREENWIDTH 1000
#define SCREENHEIGHT 1000
#define BITSPERPIXEL 32

sfRenderWindow* sf_init()
{
        sfVideoMode mode =
                        { SCREENWIDTH, SCREENHEIGHT, BITSPERPIXEL };

        /* Create the main window */
        return sfRenderWindow_create(mode, "SFML window", sfResize | sfClose, NULL);

}

void main(){
       sfRenderWindow* window = sf_init();
}
 
But why doesn't work this:

#include <SFML/Graphics.h>
#define SCREENWIDTH 1000
#define SCREENHEIGHT 1000
#define BITSPERPIXEL 32

void sf_init(sfRenderWindow *window)
{
        sfVideoMode mode =
                        { SCREENWIDTH, SCREENHEIGHT, BITSPERPIXEL };

        /* Create the main window */
        window = sfRenderWindow_create(mode, "SFML window", sfResize | sfClose, NULL);

}
void main(){
        sfRenderWindow* window;
        sf_init(window);
}
 

Any ideas into where the problem lies? Thanks.

Pages: [1]
anything