Yes, you are absolutely correct. I did review the document but not to
the extent I should have.
73,
Ron / W4MMP
On 1/26/2020 08:39, zahid wrote:
>Well it turns out that much more needs to be included on Raspbian
verses other Linux distributions or Windows
> (winsock.h brings everything in)
That's what that tutorial suggested.
That is why I said inclusive of those header files was a wild guess.
My suggestion was along the right lines
, Sorry I didn't want to go through the whole tutorial to find the
actual answer. I just did a quick of the tutorial scanned
.
On 26/01/2020 03:35, Ronald Patton wrote:
Hi,
Well it turns out that much more needs to be included on Raspbian
verses other Linux distributions or Windows (winsock.h brings
everything in).
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
All good now. The source compiles under Netbeans without errors or
warnings.
73,
Ron / W4MMP
On 1/25/2020 15:21, zahid wrote:
> attempted to compile the source outside of Netbeans. The same issue.
That is a valuable and positive result. one step closer.
On 25/01/2020 20:17, Ronald Patton wrote:
Hello and thanks for taking a look.
Yes, I am fairly well acquainted with socket programming on both
Windows and Linux (this case Raspbian),but I am no expert for sure.
I gave your recommendation a try, but no go.
OK, attempted to compile the source outside of Netbeans. The same
issue. There is a configuration issue with Raspbian when it comes
to network programming. Time to post something on the Raspberry
Foundation forum.
73,
Ron / W4MMP
On 1/25/2020 13:39, Zahid Rahman wrote:
This guy seems to know the differences between different
operating systems, on this topic of socket programming.
https://www.gta.ufrj.br/ensino/eel878/sockets/index.html
A Wild guess to your question could be
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
I think your issue is operating system C portability/compatibility
issue not netbeans issue.
On Sat, 25 Jan 2020, 16:06 Ronald Patton, <w4...@aol.com.invalid>
wrote:
Hello,
Background: I am porting a Windows (Win10) application that
was developed with Visual Studio 2017 to the Raspberry Pi 4B.
The source as been copied to the RPi. Netbeans 11.2 is
installed on the RPi. The C/C++ plugin has been installed.
Below is the Netbeans version info:
/*Product Version: Apache NetBeans IDE 11.2*//*
*//*Updates: NetBeans IDE is updated to version NetBeans 8.2
Patch 2*//*
*//*Java: 11.0.6; OpenJDK Server VM
11.0.6+10-post-Raspbian-1deb10u1*//*
*//*Runtime: OpenJDK Runtime Environment
11.0.6+10-post-Raspbian-1deb10u1*//*
*//*System: Linux version 4.19.93-v7l+ running on arm; UTF-8;
en_US (nb)*//*
*//*User directory: /home/ron/.netbeans/11.2*//*
*//*Cache directory: /home/ron/.cache/netbeans/11.2*/
The issue I am experiencing is with certain header files.
This particular application needs access to the network. I
have included:
#include <math.h>
#include<string.h> //memset
#include<stdlib.h> //exit(0);
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
The last should include definitions for network variables and
functions however when adding:
struct sockaddr_in si_me, si_other, si_gui;
Netbeans reports:
/*unable to resolve forward declaration sockaddr_in.*//*
*//*----*//*
*//*(Alt-Enter shows hints)*/
Netbeans also reports the same for the sendto call.
I'm sure it is something simple that I have over looked but
searching the internet has not provided answers.
Regards,
--
73,
Ron / W4MMP
--
Backbutton.co.uk
¯\_(ツ)_/¯
♡۶Java♡۶RMI ♡۶
Make Use Method {MUM}
makeuse.org
{MUM}opensuse.org
--
Backbutton.co.uk
¯\_(ツ)_/¯
♡۶Java♡۶RMI ♡۶
Make Use Method {MUM}
makeuse.org
{MUM}opensuse.org