g++ in ubuntu 64bit encounter "not declared in this scope"
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
g++ in ubuntu 64bit encounter "not declared in this scope"
hi,
I want to compille a osrtspproxy_2_0 tool from source with I get it from github. But it get "not declared in this scope" error. I check the code but couldn't find any clue.
The OS is ubuntu 14.04 and 64bit. gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1).
here is the compile infomation.
Quote:
g++ -DNDEBUG -D_UNIX -D_LINUX -Wall -I/usr/local/include -I. -c -o str.o str.cpp
In file included from str.h:14:0,
from str.cpp:14:
tlist.h: In member function ‘T& TSingleList<T>::Iterator:perator*()’:
tlist.h:97:20: error: ‘m_pNode’ was not declared in this scope
return m_pNode->GetData();
^
tlist.h: In member function ‘const T& TSingleList<T>::ConstIterator:perator*() const’:
tlist.h:117:20: error: ‘m_pNode’ was not declared in this scope
return m_pNode->GetData();
^
tlist.h: In member function ‘T& TDoubleList<T>::Iterator:perator*()’:
tlist.h:285:20: error: ‘m_pNode’ was not declared in this scope
return m_pNode->GetData();
^
tlist.h: In member function ‘const T& TDoubleList<T>::ConstIterator:perator*() const’:
tlist.h:305:20: error: ‘m_pNode’ was not declared in this scope
return m_pNode->GetData();
^
make[1]: *** [str.o] Error 1
You ought to use [code]your code[/code] instead of [quote].. Please try to edit your original post and fix this issue!
I would say the error message is misleading, I think this file is ok, probably the file str.cpp contains something strange, but we cannot see that.
Using gcc-4.4 / g++-4.4 : Edit the three Makefile´s in
{ libapp/, librtsp/, rtspproxy/ } from
CC=gcc
CXX=g++
to :
CC=gcc-4.4
CXX=g++-4.4
-
hi,knudfl
thanks for your quick reply. And I can see some difference exist on the version on code.google and the one I used.
I want to check that out. But my headache is I can not get any access to the code.google trunk for the firewall blocking.
Would you please spare some time to help me with it. Many thanks.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,494
Rep:
← #5 .
OK, I got a new download with ...
$ svn checkout http://mmqos.googlecode.com/svn/trunk/ mmqos-read-only
And packed it up :
$ tar -cf mmqos-osrtspproxy_2_0_svn.r43.tar mmqos-read-only/
I don't know if you solved this but I posted this on my site. This is how I got the not in scope error to go away. If it tells you what line for that error, please check it out.
Swig complained today at random:
void myfunc1 (arg1);
void myfunc2(arg2);
It is puzzling to me that in my headers, I had spaces or no spaces throughout between function name and parameters, and why at random did swig/g++ decide to give the error :
sqlFB_wrap.cxx: In function ‘int _wrap_FooFunct(ClientData, Tcl_Interp*, int, Tcl_Obj* const*)’:
sqlFB_wrap.cxx:2134:16: error: ‘FooFunct’ was not declared in this scope
FooFunct(arg1);
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.