NO

Author Topic: SFML project  (Read 3761 times)

elmilenmch

  • Guest
SFML project
« on: January 05, 2016, 08:39:05 AM »
Hello! I am new. I try to make project with
CSFML-2.3-windows-64-bit

my program is:
Code: [Select]
#include <SFML/Graphics.h>

int main(int argc, char *argv[])
{
    sfVideoMode mode = {800, 600, 32};
    sfRenderWindow * window;
    sfEvent event;

    window = sfRenderWindow_create(mode, "SFML window", sfResize | sfClose, NULL);

    while (sfRenderWindow_isOpen(window)){
        while (sfRenderWindow_pollEvent(window, &event)){if (event.type == sfEvtClosed) sfRenderWindow_close(window);}
        sfRenderWindow_clear(window, sfGreen);
        sfRenderWindow_display(window);
    }

    sfRenderWindow_destroy(window);
    return 0;
}

I set search path and linker settings - see attached pics.

The build result is:

Building sp1.exe.
POLINK: error: Unresolved external symbol '__imp_sfRenderWindow_create'.
POLINK: error: Unresolved external symbol '__imp_sfRenderWindow_close'.
POLINK: error: Unresolved external symbol '__imp_sfRenderWindow_pollEvent'.
POLINK: error: Unresolved external symbol '__imp_sfGreen'.
POLINK: error: Unresolved external symbol '__imp_sfRenderWindow_clear'.
POLINK: error: Unresolved external symbol '__imp_sfRenderWindow_display'.
POLINK: error: Unresolved external symbol '__imp_sfRenderWindow_isOpen'.
POLINK: error: Unresolved external symbol '__imp_sfRenderWindow_destroy'.
POLINK: fatal error: 8 unresolved external(s).
*** Error code: 1 ***
Done.

in the lib folder are files:

msvc/csfml-window-2.lib
msvc/csfml-graphics-2.lib

and so on

precompiled dll:

csfml-graphics-2.dll...

I put in my project folder.

It do not work  :-[

In the lib folder of SFML has libs also for gcc - gcc/libcsfml-graphics.a and so on, but they do not work here. I use them to make programs with gcc and code::blocks in windows 7 64bit and all works, but I want to use Pelles C.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: SFML project
« Reply #1 on: January 05, 2016, 10:23:49 AM »
In http://www.sfml-dev.org/download/csfml/ Visual C++ / GCC - 64-bit package is broken,  msvc-libs are for i386 ?
In 2.2 package they are 64-bit.

Attached libs for v.2.3 x64 libs made with polib.
May the source be with you

elmilenmch

  • Guest
Re: SFML project
« Reply #2 on: January 05, 2016, 11:52:16 AM »
Thank you, very much!

v.2.2 and libs from you works fine!

It must also delete settings from the Linker page/ DLL files with delayed loading (I do not understand this anyway) and to declare main function with _cdecl.

Problem solved, thanks again!

Grincheux

  • Guest
Re: SFML project
« Reply #3 on: February 17, 2016, 12:59:40 PM »
What does it do?

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: SFML project
« Reply #4 on: February 19, 2016, 08:11:13 AM »