Flying Electron Inc пишет:
> Hi all!
>
> This is kind of out there, but hoping someone might know what I did
> wrong.  I am trying to add a STRAIGHT_TRAVERSE2 function right next to
> the original STRAIGHT_TRAVERSE function in the code.
>
> I did the following:
>
> 1.  Added a STRAIGHT_TRAVERSE2 function in src/emc/task/emccanon.cc
> (This already contains the original STRAIGHT_TRAVERSE function)
> 2.  Added an extern declaration for STRAIGHT_TRAVERSE2 in
> /src/emc/nml_intf/canon.hh (This already contains an extern
> declaration for the original STRAIGHT_TRAVERSE function)
> 3.  I try to call STRAIGHT_TRAVERSE2 in the
> /src/emc/rs274ngc/interp_convert.cc file right below a call to the
> original STRAIGHT_TRAVERSE function.
>
> When trying to build this, I get the following error
>
> Linking rs274
> g++ -L/home/lawrence/emc2-dev/lib
> -Wl,-rpath,/home/lawrence/emc2-dev/lib -o ../bin/rs274
> objects/emc/sai/saicanon.o objects/emc/sai/driver.o
> objects/emc/rs274ngc/tool_parse.o ../lib/librs274.so.0
> ../lib/libemcini.so.0 -Wall -g -I.
> -I/home/lawrence/emc2-dev/src/include -DULAPI -D_GNU_SOURCE -Os
> -DLOCALE_DIR=\"/usr/share/locale\" -DPACKAGE=\"emc2\" 
> ../lib/librs274.so.0: undefined reference to `STRAIGHT_TRAVERSE2(int,
> double, double, double, double, double, double, double, double, double)'
> collect2: ld returned 1 exit status
>
> I must be doing something wrong but I can not for the life of me
> figure out what it is.  My implementation of STRAIGHT_TRAVERSE2 is
> right below the code for STRAIGHT_TRAVERSE in emccanon.cc and my
> external declaration for STRAIGHT_TRAVERSE2 is right below the
> external declaration for STRAIGHT_TRAVERSE in canon.hh .  
>
> Anybody suggest anything I can try?  I really don't understand why the
> linker is saying undefined reference when it is defined...
>
You need to implement this function one more time -- in sai driver now.
If you look at link line, you will notice, that implementation in
emccanon.c
is not linked in, but you are linking against saidriver...

BTW, to have AXIS working, you will need one more implementation in
gcodemodule.cc...

Regards,
Alex.
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ------------------------------------------------------------------------
>
> _______________________________________________
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>   


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to