Hi,
I can get a test program running on Win 10 using SFML 2.4.1 (GCC 4.9.2 TDM (SJLJ) - 32-bit), but am having trouble doing the same with CSFML 2.3 (using the same compiler, using the CSFML files as supplied). I'm very rusty so expect it to be a noob error, please be gentle
![Wink ;)](https://www.sfml-dev.org/forums/Smileys/default/wink.gif)
I can get to the same point in codeblocks and commandline. What I am doing and the output is this:
gcc -ICSFML/include -LCSFML/lib/gcc -LSFML-2.4.1/lib ctest/main.c -octest/main.exe
C:\Users\GAMING~1\AppData\Local\Temp\ccWpC4tj.o:main.c:(.text+0x56): undefined reference to `_imp__sfWindow_create'
C:\Users\GAMING~1\AppData\Local\Temp\ccWpC4tj.o:main.c:(.text+0x69): undefined reference to `_imp__sfWindow_isOpen'
collect2.exe: error: ld returned 1 exit status
So it read the header but couldn't find the definition. But looking in libcsfml-window.a with 7zip it appears to be there (but it's looking for "underscore imp double underscore", the lib has it as "double underscore imp underscore", no idea why that would be or if it matters):
...
d000025.o sfWindow_createFromHandle
d000025.o __imp_sfWindow_createFromHandle
d000024.o sfWindow_create
d000024.o __imp_sfWindow_create
d000023.o sfWindow_close
d000023.o __imp_sfWindow_close
...
Here's the test code, which is just example code cut down and converted to C:
#include <SFML/Window.h>
int main()
{
sfWindow *window;
sfVideoMode mode = {800, 600, 32};
window = sfWindow_create(mode, "Title", sfTitlebar|sfClose, NULL);
while (sfWindow_isOpen(window)){}
return 0;
}
I've googled, changed the order of the gcc parameters, tried -std=c99, did the same in codeblocks using the c++ tutorial, and am out of ideas. Any ideas where I'm going wrong?