simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] SimulAVR Compilation Problem


From: Mattias Wildeman
Subject: Re: [Simulavr-devel] SimulAVR Compilation Problem
Date: Sat, 29 Jan 2005 11:47:50 +0100

Well, i did the lazy thing and worked past the inet_pton in
mysocket.cpp replacing it with "adress->sin_addr.s_addr =
htons(0x7f000001);".

After that it compiles fine, but i've run into a really weird problem.
If i didn't know better, i would suspect
there was a compiler bug, but it is probably related to some sort of
c++ overloading.

The problem occurs with "getopt_long" in main.c. After fetching the
"-d atmega8", the code enters the " case 'd' " switch and tries to
access "optarg". Weirdly enough, it is a null pointer! If i use GDB to
check it, it displays the correct value though.

I'm not very familiar with c++, c is what i typically use for coding.
Is there any c++ version of getopt that could be used instead? Anyone
got any idea why optarg ends up with a null pointer? (Note: This is on
Cygwin on Windows).

BR,
Mattias


On Fri, 28 Jan 2005 19:03:36 -0500, Bill <address@hidden> wrote:
> Mattias Wildeman wrote:
> 
> >I got the ./configure script to work:
> >
> >It seems that having "avr-readelf" installed somewhere takes
> >precedence over the "
> >--with-bfd-path" flag supplied to ./configure. It should probably be
> >the other way around...
> >
> >
> Yes, old problem...I thought it was fixed. Patches greatfully accepted ;-)
> I'll add it to my todo list...
> 
> >Anyway, i worked around this by copying
> >"/usr/local/avr/i686-pc-cygwin" to "/cygdrive/c/WinAVR".
> >
> >BR,
> >Mattias
> >
> >Ps. Compilation works fine until it gets to mysocket.cpp: I'm working
> >on resolving it.
> >
> >
> Cool. That's as far as I got. Thanks for rolling up your sleeves and
> digging in!
> 
> >make[2]: Entering directory `/ematwil/simulavrxx-0.8.004/src'
> >/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
> >-I/cygdrive/c/WinAVR/i686-pc-cygwin/avr/include -I../src -I ../src
> >-O2 -g -O2 -c -o mysocket.lo `test -f mysocket.cpp || echo
> >'./'`mysocket.cpp
> > g++ -DHAVE_CONFIG_H -I/cygdrive/c/WinAVR/i686-pc-cygwin/avr/include
> >-I../src -I ../src -O2 -g -O2 -c mysocket.cpp  -DPIC -o
> >.libs/mysocket.o
> >mysocket.cpp: In member function `void Socket::OpenSocket(int)':
> >mysocket.cpp:67: error: `inet_pton' undeclared (first use this function)
> >mysocket.cpp:67: error: (Each undeclared identifier is reported only once for
> >   each function it appears in.)
> >make[2]: *** [mysocket.lo] Error 1
> >make[2]: Leaving directory `/ematwil/simulavrxx-0.8.004/src'
> >
> >Ds.
> >
> >
> >
> >On Fri, 28 Jan 2005 12:35:08 +0100, Mattias Wildeman <address@hidden> wrote:
> >
> >
> >>Well, i guess i'll have to port it then :) Doing it with the cygwin
> >>package should be easy (i think...).
> >>
> >>Do you have any example makefiles that were used to build it on linux?
> >>
> >>BR,
> >>Mattias
> >>
> >>On Fri, 28 Jan 2005 12:26:05 +0100 (MET), Klaus Rudolph
> >><address@hidden> wrote:
> >>
> >>
> >>>Hi Mattias,
> >>>
> >>>
> >>>
> >>>>I've been unsuccessful in compiling the simulavrxx-0.8.004 package.
> >>>>Whenever i try to compile i end up with an error in the
> >>>>"configuration" phase:
> >>>>
> >>>>
> >>>>I'm running MS Win with the cygwin package and WinAVR binaries
> >>>>
> >>>>
> >>>Yes, M$ Win is currently not supported. It seems to be no big problem to
> >>>port it to M$ world but there is no one who want to do it. I personaly have
> >>>no Windows since years and I would not buy one :-)
> >>>
> >>>Regards,
> >>>   Klaus
> >>>
> >>>--
> >>>Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl
> >>>
> >>>
> >>>
> >
> >
> >_______________________________________________
> >Simulavr-devel mailing list
> >address@hidden
> >http://lists.nongnu.org/mailman/listinfo/simulavr-devel
> >
> >
> >
> 
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]