Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
All support for Intel NUC 7 - 13 systems has transitioned to ASUS. Read latest update.
12583 Discussions

NicheStack (BSD Socket) Linking Errors

Honored Contributor II

Hey Guys, 


I'm having linking problems with the BSD sockets features and the Niche Stack. 

I'll try keeps this short, but I can post more info if required. 


Where the problem lies, is the inclusion access to a BSD file "netdb.h": 


The wierd thing is using# include<netdb.h> works for one class (lets call it Class A) and not the other (Class B). Both these classes are located in the same directory. 

By works, i mean no compile errors and the Eclipse preveiw and links etc can dig down to netdb.h via the functions utilised from netdb.h. 

The busted one (Class B) gives me the warning on the include:  


--- Quote Start ---  


netdb.h: No such file or directory 


--- Quote End ---  



next i tried: I removed the references from the ClassB (busted class), so that only the previous working class (ClassA) has references to netdb.h; by doing this it then breaks the ClassA in the same way that ClassB was previously. 


my question is.. what the hell? 

Why would it work on ClassA onlly while ClassB was trying and failing to include it? 


Not that it matters, ClassB inherits ClassA; but i don't think this is the problem since ClassA breaks when its the only one trying to include netdb.h 


Any help or insight would be greatly appreciated.
0 Kudos
0 Replies