Mingw Error Getaddrinfo Was Not Declared In This Scope
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions undefined reference to wsastartup@8' you might have Meta Discuss the workings and policies of undefined reference to `getaddrinfo@16' this site About Us Learn more about Stack Overflow the company Business Learn more about hiring getaddrinfo is undefined developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
Winsock Getaddrinfo
a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up socket programming in mingw up vote 3 down vote favorite 1 I Write a server/client C++ code and test in Visual Studio, and it was OK, But i want to convert to c++ getaddrinfo CodeBlocks MinGW(Gnu CC Compiler) and it return some error, like: warning: ignoring #pragma comment [-Wunknown-pragmas] error: 'getaddrinfo' was not declared in this scope| error: 'freeaddrinfo' was not declared in this scope| My Server Code : #undef UNICODE #define WIN32_LEAN_AND_MEAN #include
here for a quick overview of the site Help Center Detailed answers to any questions ws2_32 you might have Meta Discuss the workings and policies of this
Getaddrinfo Example
site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community http://stackoverflow.com/questions/20303583/socket-programming-in-mingw of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Winsock server code not compiling with MinGW up vote 1 down vote favorite following is the winsock server code from http://msdn.microsoft.com/en-us/library/windows/desktop/ms737593(v=vs.85).aspx #undef UNICODE #define WIN32_LEAN_AND_MEAN #include
QtForum.org » Qt » Qt Programming » Error linking against libws2_32 Skip user information Eloy8857 http://www.qtforum.org/post/105145/error-linking-against-libws2-32.html Beginner Posts: 3 1 Saturday, April 24th 2010, 12:41am Error linking against libws2_32 Hello, I'm developing a Qt (4.6.1) application with QtCreator (1.3.1), but https://graal.in/forum/platform/gserver-discussion/bug-reports-feature-requests/resolved/6458-dependancies-getting-old-and-compiling-errors-with-dev-c I'm not able to link it agains libws2_32 The .pro file: Source code 1 2 3 4 5 6 7 8 9 10 undefined reference 11 12 13 14 15 16 17 18 19 # ------------------------------------------------- # Project created by QtCreator 2010-01-21T00:17:12 # ------------------------------------------------- TARGET = RSOClient TEMPLATE = app #LIBS += -LE:\boost\bin.v2\libs\regex\build\gcc-mingw-4.4.0\release\link-static\threading-multi -lboost_regex-mgw44-mt-1_42 LIBS += -lws2_32 -lwsock32 SOURCES += main.cpp \ mainwindow.cpp \ ../../win/sockets/clsSocket/clsSocket.cpp \ ../../clsClientSocket/clsClientSocket.cpp \ ../../utils/string_functions.cpp HEADERS += mainwindow.hpp undefined reference to \ ../../win/sockets/clsSocket/clsSocket.hpp \ ../../clsClientSocket/clsClientSocket.hpp \ ../../utils/string_functions.hpp FORMS += mainwindow.ui INCLUDEPATH += ../../win \ e:/boost And the compiler's (mingw) output is: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 Ejecutando los pasos para construir el proyecto RSOClient... Iniciando: E:/Qt/2010.01/mingw/bin/mingw32-make.exe clean -w mingw32-make: Entering directory `E:/eloy/c++/RSOQtClient/RSOClient' e:\qt\2010.01\qt\bin\qmake.exe -spec ..\..\..\..\Qt\2010.01\qt\mkspecs\win32-g++ -win32 -o Makefile RSOClient.pro mingw32-make: Leaving directory `E:/eloy/c++/RSOQtClient/RSOClient' mingw32-make: Entering directory `E:/eloy/c++/RSOQtClient/RSOClient' E:/Qt/2010.01/mingw/bin/mingw32-make -f Makefile.Debug clean mingw32-make[1]: Entering directory `E:/eloy/c++/RSOQtClient/RSOClient' del debug\moc_mainwindow.cpp del ui_mainwindow.h del debug\main.o debug\mainwindow.o debug\clsSocket.o debug\clsClientSocket.o debug\string_functions.o debug\moc_mainwindow.o No se encuentra E:\eloy\c++\RSOQtClient\RSOClient\debug\moc_mainwindow.cpp mingw32-make[1]: Leaving directory `E:/eloy/c++/RSOQtClient/RSOClient' E:/Qt/2010.01/mingw/bin/mingw32-make -f Makefile.Release clean mingw32-make[1]: Entering directory `E:/eloy/c++/RSOQtClient/RSOClient' del release\moc_mainwindow.cpp del ui_mainwindow.h del release\mai
Bug Reports / Feature Requests RESOLVED If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Announcement Collapse No announcement yet. dependancies getting old and compiling errors with Dev-C++ Collapse X Collapse Posts Latest Activity Search Page of 2 Filter Time All Time Today Last Week Last Month Show All Discussions only Photos only Videos only Links only Polls only Filtered by: Clear All new posts #1 2012-06-15, 01:41 PM Zartox Senior Member Join Date: Feb 2011 Posts: 311 [RESOLVED Feature Request] dependancies getting old and compiling errors with Dev-C++ I am trying to compilie gserver-v2, taken from svn with Dev++ 4.9.9.2. I have to make my own project file, and specify include directories. First problem seen seems internal to the compiler https://sourceforge.net/projects/dev...4/index/page/1 Second problem was a bunch of invalid conversion errors in bzip2 (bzip.c I think). I removed those by downloading bzip2-1.0.6. (latest) Then I began to have some redefinition errors with miniupnpc. I tried to get rid of them by downloading latest version: 1.7. But then, I now get some errors because there is now a new argument: CUPNP.cpp:20 device_list = upnpDiscover(2000, 0, 0, 0); 60 CDocuments and Settings\Paul\Desktop\graal_reborn\gserver-v2\trunk\dependencies\miniupnpc-1.7\miniupnpc.h too few arguments to function `UPNPDev* upnpDiscover(int, const char*, const char*, int, int, int*)' CUPNP.cpp:64 int r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port.text(), port.text(), addr.text(), "Graal GServer", "TCP", 0); 124 CDocuments and Settings\Paul\Desktop\graal_reborn\gserver-v2\trunk\dependencies\miniupnpc-1.7\upnpcommands.h too few arguments to function `int UPNP_AddPortMapping(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*)' And also, there seems to be some confusion between #include *