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 - sylvainmahe

Pages: [1]
1
C / Re: CSFML + MinGW + Batch
« on: September 09, 2012, 06:47:26 pm »
Ok thanks :)

g++.exe work fine with c sdl project, but gcc.exe return error (sdl or csfml project).

2
C / CSFML + MinGW + Batch
« on: September 09, 2012, 06:04:35 pm »
Hi :)

Sorry for my bad english. For my other projects (sdl, flash as3, etc...), I used Notepad++ and batch script to compile, but this don't work with csfml :(

I have windows xp, so I downloaded Windows - MinGW (14.9 MB):
http://downloads.sourceforge.net/sfml/SFML-1.6-c-dev-windows-mingw.zip

I put .dll with .exe, .a in C:\Program Files\MinGW\lib, and .h (SFML directory) in C:\Program Files\MinGW\include (like SDL).

Ok, look my .bat :)
"C:\Program Files\MinGW\bin\g++.exe" Main.c -lcsfml-graphics -lcsfml-window -lcsfml-system -o program.exe

And my Main.c ;)
#include <stdio.h>
#include <stdlib.h>
#include <SFML/Graphics.h>
#include <SFML/Window.h>
#include <SFML/System.h>

#define SFML_DYNAMIC

int main (int argc, char *argv[])
{
        sfRenderWindow* screen;
        sfVideoMode modeScreen = {1024, 512, 32};
        sfWindowSettings settingsScreen = {24, 8, 0};
       
        //screen = sfRenderWindow_Create (modeScreen, "Video Editor", sfClose, settingsScreen);
       
        //sfRenderWindow_Close (screen);
        //sfRenderWindow_Destroy (screen);
       
        return 0;
}
 

If I unmasks screen = sfRenderWindow_Create etc.., console show me an error:
C:\DOCUME~1\user\LOCALS~1\Temp/cc21baaa.o(.text+0x8d):Main.c: undefined referenc
e to `sfRenderWindow_Create(sfVideoMode, char const*, unsigned long, sfWindowSet
tings)'

I don't understand this, I tried many tips, don't worked :-\

Can you help me please? :D

Pages: [1]
anything