Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Link Problem | #pragma comment (lib, "Ws2_32.lib")(WinSock API)
Link Problem | #pragma comment (lib, "Ws2_32.lib") [message #1111567] Wed, 18 September 2013 11:53
ler lol is currently offline ler lolFriend
Messages: 1
Registered: September 2013
Junior Member
Well, I really tried to avoid posting on any forum since I prefer to help myself, but after hours and hours of trying, I really need some advice.

I started to setup up Eclipse for Javaand extended it for C++. I manage to build, compile and run stuff (ye, even managed to get console output in eclipse).

Now I started to create my own Server/Client application. So far, so good.

Using the standard WinSOCK API since it is kinda nice... or not?

My Problem:
#pragma comment (lib, "Ws2_32.lib"
)
-> Pragma comment gets ignored [-Wunknown-pragmas]

#pragma comment (lib, "Ws2_32.lib")
#pragma comment (lib, "Mswsock.lib")
#pragma comment (lib, "AdvApi32.lib")

->Pragma comment gets ignored [-Wunknown-pragmas]

Microsoft SDK is installed. Than I linked all the libs myself, here a screenshot (not sure if I did it right):
(cant add a screen shot since I lack the 5 posts -.-)

Since these libs dont work somehow, I cant use APi calls like:
freeaddrinfo(result);
iResult = getaddrinfo(NULL, DEFAULT_PORT, &hints, &result);

-> Functions could not be resolved.

Toolchain: MinGW GCC
Builder: CDT Internal Builder
Used Tools:
GCC Assembler
GCC Archiver
GCC C++ Compiler
GCC C Compiler
MinGW C Linker
MinGW C++ Linker

Eclipse:
Version: Juno Service Release 2



I appreciate your help. If I forgot something, let me know - Gonna add it immediately.
Previous Topic:Binary Parser AIX XCOFF64
Next Topic:where is ObjectStyleMacro defined
Goto Forum:
  


Current Time: Tue Mar 19 10:10:19 GMT 2024

Powered by FUDForum. Page generated in 0.01187 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top