discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] #include "vector.hpp"


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] #include "vector.hpp"
Date: Wed, 24 Jun 2015 08:07:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi David,

GNU Radio block or not, what you're seeing is C++ error, and your code
is not really related to GNU Radio.
Since GNU Radio is written in "normal" C++, you must have made some
syntax mistake when integrating your code into the template that you get
when creating a new block.
However, that template is just a bunch of normal C++ files containing
normal classes (that's what GNU Radio is -- C++ files containing
classes); we're typically pretty resource- and helpful when it comes to
solving issues that arise when dealing with GNU Radio code, but what
you're giving us has no indication of where things go wrong, and how you
use that code in your C++ class. All we can tell you is that a) you seem
to have done it wrong and b) you might really need to learn how to read
and communicate compiler errors, so that you might yourself understand
better what goes wrong and how to ask for help in a manner that allows
people to see what's wrong.

So: Make sure you find out where you didn't write correct C++. Best
option is always to have someone who is a bit more used to that sit next
to you, and tell her/him "I wrote this code, and when I try to compile
it, I get this error", and then let that person explain to you how they
approach figuring out where the problem lies. Even if the two of you
don't really figure out the problem, that will lead to the both of you
learning about debugging -- which is really invaluable!
If you can't solve the problem, it's really O.K. to ask somewhere, but
please make sure to offer all information one might need to understand
the problem; in your case that mail would have looked something like:

"I have wrote a couple of C++ <methods/classes/functions/...> to
<purpose>. Now, <link to gist.github.com/pastebin.com/... or inline
code> compiles fine, but when I insert these
<methods/classes/functions/...> into my newly created block (gr_modtool
add <options you've used>), the following <link to full file or even
better complete OOT on gist.github.com/pastebin.com/... or inline code>
doesn't compile. I get the error <full error, especially including line
number>."

Then, it would have been easy for us to understand the connection to GNU
Radio, to actually see where things went wrong, and to analyze the error
-- all things that you might have already guessed were important to the
solution.

But I have to agree with Tom quite a bit: what you're having are mainly
C++ problems, and they don't seem to be very GNU Radio-specific. So
probably sitting with someone who knows C++ (but doesn't know GNU Radio)
makes much more sense than asking us, who know GNU Radio (and a bit of
C++) but don't have the chance to sit next to you and talk to you about
what your code does/should do and interactively explore what you do.

Best regards,
Marcus

On 06/24/2015 02:36 AM, dcardona wrote:
> I'm getting this error while I'm trying to create a new block.
> I don't get any error when I compile it in a C++ compiler.
>
>
>
> --
> View this message in context: 
> http://gnuradio.4.n7.nabble.com/include-vector-hpp-tp54344p54390.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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