Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Strange errors  (Read 5532 times)

0 Members and 1 Guest are viewing this topic.

Crank1d

  • Newbie
  • *
  • Posts: 14
    • View Profile
Strange errors
« on: July 28, 2010, 08:46:18 pm »
I´m getting these 2 errors that are strange, because everything is written OK.

main.c
Code: [Select]
#include <SFML/Graphics.h>

int main()
{
sfRenderWindow_Create(sfVideoMode(800,600,32), "SFML", sfResize | sfClose, sfWindowSettings());
return EXIT_SUCCESS;
}


errors
Code: [Select]
1>.\main.c(6) : error C2143: syntax error : missing ')' before 'type'
1>.\main.c(6) : error C2198: 'sfRenderWindow_Create' : too few arguments for call


Don´t know if it is because of CSFML or some project options need to be set (using VC2005, compiling as "C" code(but it also happens if compiled as "C++" code))

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Strange errors
« Reply #1 on: July 28, 2010, 10:30:01 pm »
There are no constructors in C... ;)
Code: [Select]
sfVideoMode mode = {800, 600, 32};
sfWindowSettings settings = {24, 8, 0};
sfRenderWindow_Create(mode, "SFML", sfResize | sfClose, settings);
Laurent Gomila - SFML developer

Crank1d

  • Newbie
  • *
  • Posts: 14
    • View Profile
Strange errors
« Reply #2 on: July 28, 2010, 11:22:44 pm »
Quote from: "Laurent"
There are no constructors in C... ;)
I feel ashamed.  :oops: I´m going to take my C lessons (again) right now.