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

Author Topic: problem compiling SFML 2.0 in cygwin  (Read 4448 times)

0 Members and 1 Guest are viewing this topic.

EnigmaticFellow

  • Newbie
  • *
  • Posts: 6
    • View Profile
problem compiling SFML 2.0 in cygwin
« on: December 22, 2011, 06:23:05 pm »
When I ran the Makefile generated from cmake, I got this error.

Code: [Select]
[  1%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.
o
In file included from /home/Chris/LaurentGomila-SFML-537e8c9/include/SFML/System
/Clock.hpp:31,
                 from /home/Chris/LaurentGomila-SFML-537e8c9/src/SFML/System/Clo
ck.cpp:28:
/home/Chris/LaurentGomila-SFML-537e8c9/include/SFML/Config.hpp:65:6: #error This
 operating system is not supported by SFML library
make[2]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o] Error 1
make[1]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/all] Error 2
make: *** [all] Error 2


Does this mean that the current library isn't supported by cygwin at the moment?  And if that's the case, should I just try minGW instead?  I'm currently trying to do this under a 64-bit Windows 7 system, and I was able to compile the SFML 2.0 library just fine under my Linux system.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
problem compiling SFML 2.0 in cygwin
« Reply #1 on: December 22, 2011, 08:20:08 pm »
Cygwin is not explicitely supported, but I thought it would just work fine, either as a Linux or as a Windows platform. It seems that it doesn't map to any of them.

You can add an issue in the task tracker, or directly provide a patch if you know how to correctly handle it.
Laurent Gomila - SFML developer

EnigmaticFellow

  • Newbie
  • *
  • Posts: 6
    • View Profile
problem compiling SFML 2.0 in cygwin
« Reply #2 on: December 22, 2011, 09:16:39 pm »
Since I have no idea of how to patch it at the moment, I posted it on the bug tracker.  Meanwhile, I'll just play around with SFML on my other system.

Oneiros

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
problem compiling SFML 2.0 in cygwin
« Reply #3 on: December 23, 2011, 10:32:35 am »
Quote from: "EnigmaticFellow"
should I just try minGW instead? I'm currently trying to do this under a 64-bit Windows 7 system


MinGW work fine for me with Windows 7 64bit or 32bit

kaeptmblaubaer1000

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: problem compiling SFML 2.0 in cygwin
« Reply #4 on: June 10, 2016, 11:22:46 am »
Cygwin is not explicitely supported, but I thought it would just work fine, either as a Linux or as a Windows platform. It seems that it doesn't map to any of them.

You can add an issue in the task tracker, or directly provide a patch if you know how to correctly handle it.

It doesn`t works.
$ make
Scanning dependencies of target sfml-system
[  1%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o
[  2%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.o
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Lock.cpp.o
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Mutex.cpp.o
[  4%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.o
[  5%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o
[  6%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Thread.cpp.o
[  7%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/ThreadLocal.cpp.o
[  8%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Time.cpp.o
[  9%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.o
[ 10%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/MemoryInputStream.cpp.o
[ 11%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ClockImpl.cpp.o
[ 12%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/MutexImpl.cpp.o
[ 13%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/SleepImpl.cpp.o
[ 14%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadImpl.cpp.o
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp: In Konstruktor »sf::priv::ThreadImpl::ThreadImpl(sf::Thread*)«:
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp:42:111: Fehler: ungültige Umwandlung von »unsigned int (__attribute__((__stdcall__)) *)(void*)« in »LPTHREAD_START_ROUTINE {aka long unsigned int (__attribute__((__stdcall__)) *)(void*)}« [-fpermissive]
     m_thread = reinterpret_cast<HANDLE>(_beginthreadex(NULL, 0, &ThreadImpl::entryPoint, owner, 0, &m_threadId));
                                                                                                               ^
In file included from /usr/include/w32api/winbase.h:29:0,
                 from /usr/include/w32api/windows.h:70,
                 from /home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.hpp:32,
                 from /home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp:28:
/usr/include/w32api/processthreadsapi.h:160:28: Anmerkung:   Argument 3 von »void* CreateThread(LPSECURITY_ATTRIBUTES, SIZE_T, LPTHREAD_START_ROUTINE, LPVOID, DWORD, LPDWORD)« wird initialisiert
   WINBASEAPI HANDLE WINAPI CreateThread (LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);
                            ^
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp:42:111: Fehler: ungültige Umwandlung von »unsigned int*« in »LPDWORD {aka long unsigned int*}« [-fpermissive]
     m_thread = reinterpret_cast<HANDLE>(_beginthreadex(NULL, 0, &ThreadImpl::entryPoint, owner, 0, &m_threadId));
                                                                                                               ^
In file included from /usr/include/w32api/winbase.h:29:0,
                 from /usr/include/w32api/windows.h:70,
                 from /home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.hpp:32,
                 from /home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp:28:
/usr/include/w32api/processthreadsapi.h:160:28: Anmerkung:   Argument 6 von »void* CreateThread(LPSECURITY_ATTRIBUTES, SIZE_T, LPTHREAD_START_ROUTINE, LPVOID, DWORD, LPDWORD)« wird initialisiert
   WINBASEAPI HANDLE WINAPI CreateThread (LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);
                            ^
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp: In statischer Elementfunktion »static unsigned int sf::priv::ThreadImpl::entryPoint(void*)«:
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp:86:19: Fehler: »_endthreadex« wurde in diesem Gültigkeitsbereich nicht definiert
     _endthreadex(0);
                   ^
make[2]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/build.make:399: src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadImpl.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:119: src/SFML/System/CMakeFiles/sfml-system.dir/all] Fehler 2
make: *** [Makefile:128: all] Fehler 2
 

I have wrote a
#define __Linux__
but it tries to accesss an MSVC function named _beginthreadex.

kaeptmblaubaer1000

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: problem compiling SFML 2.0 in cygwin
« Reply #5 on: June 10, 2016, 11:33:29 am »
I also have a
#define _beginthreadex CreateThread
in the Config.hpp,
without it the error message is
$ make
Scanning dependencies of target sfml-system
make[2]: Warnung: Datei „src/SFML/System/CMakeFiles/sfml-system.dir/depend.make“ hat hat in der Zukunft liegende Änderungszeit 0,65
[  1%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o
[  2%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.o
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Lock.cpp.o
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Mutex.cpp.o
[  4%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.o
[  5%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o
[  6%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Thread.cpp.o
[  7%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/ThreadLocal.cpp.o
[  8%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Time.cpp.o
[  9%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.o
[ 10%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/MemoryInputStream.cpp.o
[ 11%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ClockImpl.cpp.o
[ 12%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/MutexImpl.cpp.o
[ 13%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/SleepImpl.cpp.o
[ 14%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadImpl.cpp.o
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp: In Konstruktor »sf::priv::ThreadImpl::ThreadImpl(sf::Thread*)«:
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp:42:111: Fehler: »_beginthreadex« wurde in diesem Gültigkeitsbereich nicht definiert
     m_thread = reinterpret_cast<HANDLE>(_beginthreadex(NULL, 0, &ThreadImpl::entryPoint, owner, 0, &m_threadId));
                                                                                                               ^
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp: In statischer Elementfunktion »static unsigned int sf::priv::ThreadImpl::entryPoint(void*)«:
/home/bau040628b/sfml/src/SFML/System/Win32/ThreadImpl.cpp:86:19: Fehler: »_endthreadex« wurde in diesem Gültigkeitsbereich nicht definiert
     _endthreadex(0);
                   ^
make[2]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/build.make:399: src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadImpl.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:119: src/SFML/System/CMakeFiles/sfml-system.dir/all] Fehler 2
make: *** [Makefile:128: all] Fehler 2