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 - c-jay

Pages: 1 [2]
16
C / Re: CMAKE failure
« on: August 09, 2016, 10:00:14 pm »
thank you for your reply.
I'm the user ;-)
1)How could i figure out which directory is set by CMAKE_MODULE_PREFIX ?
2)How could i set it to the right directory?

17
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.

18
C / Re: sfFloatRect_set function
« on: April 28, 2016, 05:45:45 pm »
Is it the actual code that gives you the error, or is it a simplified version for the forum, that you never compiled?

Thank you very much! I forgot to declare the prototype...  :-[

19
Something like this below?

sudo nano /etc/ld.so.conf.d/myapp.conf

  GNU nano 2.2.6                         Datei: /etc/ld.so.conf.d/myapp.conf                                                        

/home/u123/Programme/TestpProg/sfmlStuff/SFML-2.2/lib
 

and after this ldconfig and reboot generate the same failure

20
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.

21
C / Re: sfFloatRect_set function
« on: April 26, 2016, 07:36:39 pm »
And the error would be...? ::)

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

22
C / Re: sfFloatRect_set function
« on: April 26, 2016, 06:54:29 pm »
With the exception of main's return type being int (google why).
i fixed it in the main post but my code still throw the same error

23
C / Re: sfFloatRect_set function
« on: April 26, 2016, 03:44:02 pm »
I'm very sorry, I edited my post with an description

24
C / Re: sfRenderWindow as function argument
« on: April 26, 2016, 03:26:14 pm »
Okay, thank you very much for open my mind! :D

25
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.

26
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 [2]