Skip to content

Commit

Permalink
wsock32 static lib dependency removal from win build files.
Browse files Browse the repository at this point in the history
error msg if wsock load fails changed by Fl::fatal() API use.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
fab672000 committed Aug 28, 2008
1 parent 5156431 commit e77a5d1
Show file tree
Hide file tree
Showing 133 changed files with 716 additions and 265 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -42,7 +42,7 @@ IF(WIN32)
IF(BORLAND)
SET( FLTK_PLATFORM_DEPENDENT_LIBS import32 )
ELSE(BORLAND)
SET( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
SET( FLTK_PLATFORM_DEPENDENT_LIBS comctl32 )
ENDIF(BORLAND)
ENDIF(NOT CYGWIN)
ENDIF(WIN32)
Expand Down Expand Up @@ -71,7 +71,7 @@ ENDIF(APPLE AND NOT FLTK_APPLE_X11)

IF(CYGWIN)
ADD_DEFINITIONS(-DWIN32)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 supc++ -lm -lgdi32)
ENDIF(CYGWIN)

IF(MINGW)
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Expand Up @@ -618,7 +618,7 @@ case $uname in
CXXFLAGS="-mwindows -DWIN32 $CXXFLAGS"
LDFLAGS="-mwindows $LDFLAGS"
DSOFLAGS="-mwindows $DSOFLAGS"
LIBS="$LIBS -lole32 -luuid -lcomctl32 -lwsock32"
LIBS="$LIBS -lole32 -luuid -lcomctl32"
if test "x$with_optim" = x; then
dnl Avoid -Os optimization on Cygwin/Mingw
with_optim="-O3"
Expand Down
6 changes: 2 additions & 4 deletions src/Fl_win32.cxx
Expand Up @@ -83,10 +83,8 @@ static fl_wsk_async_select_f fl_wsk_async_select=0;
static HMODULE get_wsock_mod() {
if (!s_wsock_mod) {
s_wsock_mod = LoadLibrary(WSCK_DLL_NAME);
if (s_wsock_mod==NULL){
fprintf(stderr,"FLTK Lib Error: %s file not found! Please check your winsock dll accessibility.\n",WSCK_DLL_NAME);
exit(1);
}
if (s_wsock_mod==NULL)
Fl::fatal("FLTK Lib Error: %s file not found! Please check your winsock dll accessibility.\n",WSCK_DLL_NAME);
s_wsock_select = (fl_wsk_select_f) GetProcAddress(s_wsock_mod, "select");
fl_wsk_fd_is_set = (fl_wsk_fd_is_set_f) GetProcAddress(s_wsock_mod, "__WSAFDIsSet");
fl_wsk_async_select = (fl_wsk_async_select_f) GetProcAddress(s_wsock_mod, "WSAAsyncSelect");
Expand Down

0 comments on commit e77a5d1

Please sign in to comment.