Problems with linking OBJ files

Reply

Join Date: Jul 2005
Posts: 2
Reputation: ramow is an unknown quantity at this point 
Solved Threads: 0
ramow ramow is offline Offline
Newbie Poster

Problems with linking OBJ files

 
0
  #1
Jul 25th, 2005
Hi everyone,
i am havinh problems linking OBJ files that uses the following:

#include <stdio.h>
#include <winsock2.h>
#pragma comment(lib, "ws2_32")

I am working on MEX matlab files.
When i link them, i get the following errors:

>> mex timestwomex.c C:\MATLAB6p5\sys\lcc\lib\ws2_32.lib

timestwomex.obj .text: undefined reference to '_gethostbyname@4'
timestwomex.obj .text: undefined reference to '_getsockname@12'
timestwomex.obj .text: undefined reference to '_inet_ntoa@4'

C:\MATLAB6P5\BIN\WIN32\MEX.PL: Error: Link of 'timestwomex.dll' failed.

N.B: I use the mex compiler and linker on windowsXP.

Thanks,
Ramow
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,596
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 711
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Problems with linking OBJ files

 
0
  #2
Jul 25th, 2005
Try wsock32.lib.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 2
Reputation: ramow is an unknown quantity at this point 
Solved Threads: 0
ramow ramow is offline Offline
Newbie Poster

Re: Problems with linking OBJ files

 
0
  #3
Jul 25th, 2005
Originally Posted by Narue
Try wsock32.lib.
Thx Pal. I think it worked.....
Love ya man. I have been stuck with this for 1 week....
Take care
bye
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC