I'm trying to use an xbox360 controller as a joystick in openSUSE 11.2. When attempting to compile xboxdrv (http://pingus.seul.org/~grumbel/xboxdrv/) I get the following errors:
g++ -o src/xbox_controller.o -c -g -O2 -Wall -ansi -pedantic src/xbox_controller.cpp
In file included from src/xbox_controller.hpp:23,
from src/xbox_controller.cpp:24:
src/xbox_generic_controller.hpp:30: error: 'uint8_t' has not been declared
src/xbox_generic_controller.hpp:30: error: 'uint8_t' has not been declared
src/xbox_generic_controller.hpp:31: error: 'uint8_t' has not been declared
In file included from src/xbox_controller.cpp:24:
src/xbox_controller.hpp:38: error: 'uint8_t' has not been declared
src/xbox_controller.hpp:38: error: 'uint8_t' has not been declared
src/xbox_controller.hpp:39: error: 'uint8_t' has not been declared
src/xbox_controller.cpp:54: error: variable or field 'set_rumble' declared void
src/xbox_controller.cpp:54: error: 'uint8_t' was not declared in this scope
src/xbox_controller.cpp:54: error: 'uint8_t' was not declared in this scope
scons: *** [src/xbox_controller.o] Error 1
scons: building terminated because of errors.
Any ideas how to fix this?
Edit src/xbox_controller.hpp, add missing #include <stdint.h> to it (somewhere near the beginning).
Related
I'm trying to build a simple c++ code, that uses threads.
I tried to build it with Eclipse, Code Blocks, and Cygwin shell. All have resulted in the error:
"was not declared in this scope".
I added the -std=c++14 to the compiler options.
$ g++ --version
g++.exe (GCC) 7.4.0
and here's what I get:
$>g++ -std=c++14 main.cpp
main.cpp: In function 'int main()':
main.cpp:10:5: error: 'thread' was not declared in this scope
thread t1(callback, 1, 2);
^~~~~~
any idea how to solve it?
I compiled tcl 8.5.7 with thread enabled.
I installed threads using the following command :
./configure --enable-threads --enable-64bit
I installed tclreadline2.1.0-25.mga5.x86_64.rpm using yum.
I am bringing up the Tclsh with my code,
$ tclsh
Setting [some path] as myTc home directory
INFO : ###BEGIN_BEGIN-- INIT_LOG --BEGIN_BEGIN###
........
INFO : Logs will be in [thisPath]
INFO : Time taken for test INIT execution 0 : 0 : 0
NOTICE : ###END_END_END-- INIT --END_END_END###
TC>
**alloc: invalid block: 0x1f9cb50: 0 0
Aborted (core dumped)**
I even tried the instructions provided in the link : http://wiki.tcl.tk/5632.
But its not working. I am getting tclreadline error.
# make
make all-am
make[1]: Entering directory `/home/log/packages/tclreadline-2.1.0'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/usr/include -I/tmp/readline-install/include/readline -g -O2 -MT tclreadline.lo -MD -MP -MF .deps/tclreadline.Tpo -c -o tclreadline.lo tclreadline.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/usr/include -I/tmp/readline-install/include/readline -g -O2 -MT tclreadline.lo -MD -MP -MF .deps/tclreadline.Tpo -c tclreadline.c -fPIC -DPIC -o .libs/tclreadline.o
tclreadline.c:27:34: error: readline/readline.h: No such file or directory
tclreadline.c:28:33: error: readline/history.h: No such file or directory
tclreadline.c: In function ‘TclReadlineCmd’:
tclreadline.c:223: warning: passing argument 3 of ‘Tcl_GetIndexFromObj’ from incompatible pointer type
/usr/include/tclDecls.h:267: note: expected ‘const char **’ but argument is of type ‘char **’
tclreadline.c:431: error: ‘rl_line_buffer’ undeclared (first use in this function)
tclreadline.c:431: error: (Each undeclared identifier is reported only once
tclreadline.c:431: error: for each function it appears in.)
tclreadline.c: In function ‘TclReadlineInitialize’:
tclreadline.c:596: error: ‘rl_readline_name’ undeclared (first use in this function)
tclreadline.c:598: error: ‘rl_special_prefixes’ undeclared (first use in this function)
tclreadline.c:611: error: ‘rl_basic_word_break_characters’ undeclared (first use in this function)
tclreadline.c:636: error: ‘rl_attempted_completion_function’ undeclared (first use in this function)
tclreadline.c:636: error: ‘CPPFunction’ undeclared (first use in this function)
tclreadline.c:636: error: expected expression before ‘)’ token
tclreadline.c: In function ‘TclReadlineCompletion’:
tclreadline.c:662: error: ‘rl_completion_append_character’ undeclared (first use in this function)
tclreadline.c:665: error: ‘rl_line_buffer’ undeclared (first use in this function)
tclreadline.c:672: error: ‘rl_end’ undeclared (first use in this function)
tclreadline.c:673: error: ‘rl_point’ undeclared (first use in this function)
tclreadline.c:746: warning: assignment makes pointer from integer without a cast
tclreadline.c: In function ‘TclReadlineKnownCommands’:
tclreadline.c:804: error: ‘rl_line_buffer’ undeclared (first use in this function)
make[1]: *** [tclreadline.lo] Error 1
make[1]: Leaving directory `/home/log/packages/tclreadline-2.1.0'
make: *** [all] Error 2
[root#localhost tclreadline-2.1.0]#
How to resolve this issue?
I am a newbie in Centos. I installed ffmpeg in my server using yum command. I want to install ffmpeg-php. I downloaded the source file from :
http://ffmpeg-php.svn.sourceforge.net/viewvc/ffmpeg-php/trunk/ffmpeg-php/?view=tar
After extraction I use the following commands :
phpize
./configure --enable-shared
But when I try to make the build it gets the following error :
/bin/sh /usr/local/src/ffmpeg-php-0.6.0/libtool --mode=compile cc -I. -I/usr/local
/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo
libtool: compile: cc -I. -I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c -fPIC -DPIC -o .libs/ffmpeg-php.o
In file included from /usr/include/sys/stat.h:107,
from /usr/include/php/main/php_streams.h:28,
from /usr/include/php/main/php.h:405,
from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/bits/stat.h:73: error: field ‘st_atim’ has incomplete type
/usr/include/bits/stat.h:74: error: field ‘st_mtim’ has incomplete type
/usr/include/bits/stat.h:75: error: field ‘st_ctim’ has incomplete type
/usr/include/bits/stat.h:119: error: field ‘st_atim’ has incomplete type
/usr/include/bits/stat.h:120: error: field ‘st_mtim’ has incomplete type
/usr/include/bits/stat.h:121: error: field ‘st_ctim’ has incomplete type
In file included from /usr/include/php/main/php_streams.h:28,
from /usr/include/php/main/php.h:405,
from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/sys/stat.h:367: error: array type has incomplete element type
/usr/include/sys/stat.h:374: error: array type has incomplete element type
In file included from /usr/include/php/main/php.h:411,
from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/php/TSRM/tsrm_virtual_cwd.h:212: error: expected specifier-qualifier-list before ‘time_t’
/usr/include/php/TSRM/tsrm_virtual_cwd.h:240: error: expected declaration specifiers or ‘...’ before ‘time_t’
In file included from /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:46:
/usr/local/include/libswscale/swscale.h:140: warning: ‘enum AVPixelFormat’ declared inside parameter list
/usr/local/include/libswscale/swscale.h:146: warning: ‘enum AVPixelFormat’ declared inside parameter list
/usr/local/include/libswscale/swscale.h:189: warning: ‘enum AVPixelFormat’ declared inside parameter list
/usr/local/include/libswscale/swscale.h:316: warning: ‘enum AVPixelFormat’ declared inside parameter list
make: *** [ffmpeg-php.lo] Error 1
Please help !!!
In your ffmpeg-php* folder change all the files with extensions '.loT' to extension 'lo'
I am not sure is this right solution,
In your ffmpeg-php* folder change all the files with extensions '.loT'
to extension 'lo'
Just download the package from the ffmpeg site by git command and configure it,
# yum install git
# git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
# ./configure --enable-shared ... ...
I hope the issue should be solved.
I am trying to dynamically link the ogre libraries. I was able to get past linking libraries for the samples except the sample browser.
Here is the log..
Linking CXX shared library ../../lib/Sample_SSAO.so
[100%] Built target Sample_SSAO
Scanning dependencies of target SampleBrowserDummy
[100%] Building CXX object Samples/Browser/CMakeFiles/SampleBrowserDummy.dir/dummy.cpp.o
Linking CXX shared module ../../lib/libSampleBrowserDummy.so
Updated and renamed default.properties to project.properties
Updated local.properties
No project name specified, using Activity name 'NativeActivity'.
If you wish to change it, edit the first line of build.xml.
Added file /home/mihir/workspace/ogre_3d/build_dynamic/SampleBrowserNDK/build.xml
Added file /home/mihir/workspace/ogre_3d/build_dynamic/SampleBrowserNDK/proguard-project.txt
make[3]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
Compile++ thumb : OgreSampleBrowser <= FileSystemLayerImpl_Android.cpp
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:28:33: error: FileSystemLayerImpl.h: No such file or directory
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:32: error: 'FileSystemLayerImpl' has not been declared
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:36: error: 'FileSystemLayerImpl' has not been declared
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:36: error: ISO C++ forbids declaration of 'Ogre' with no type
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:36: error: expected ',' or '...' before '::' token
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:40: error: 'FileSystemLayerImpl' has not been declared
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:40: error: ISO C++ forbids declaration of 'Ogre' with no type
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:40: error: expected ',' or '...' before '::' token
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:40: error: non-member function 'bool OgreBites::fileExists(int)' cannot have cv-qualifier
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp: In function 'bool OgreBites::fileExists(int)':
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:42: error: 'path' was not declared in this scope
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:42: error: 'access' was not declared in this scope
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp: At global scope:
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:45: error: 'FileSystemLayerImpl' has not been declared
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:45: error: ISO C++ forbids declaration of 'Ogre' with no type
/home/mihir/workspace/ogre_3d/Samples/Browser/src/FileSystemLayerImpl_Android.cpp:45: error: expected ',' or '...' before '::' token
make[3]: *** [obj/local/armeabi-v7a/objs/OgreSampleBrowser/FileSystemLayerImpl_Android.o] Error 1
make[2]: *** [lib/libSampleBrowserDummy.so] Error 2
make[1]: *** [Samples/Browser/CMakeFiles/SampleBrowserDummy.dir/all] Error 2
make: *** [all] Error 2
The header files that it is complaining about being missing are present in my working directory. I also tried to manually copy the header files that it complained about and this is what i get.
/home/mihir/workspace/lab126/ogre_3d/build_dynamic/Samples/include/SampleBrowser_Android.h:332: error: expected '>' before 'AndroidEGLWindow'
/home/mihir/workspace/lab126/ogre_3d/build_dynamic/Samples/include/SampleBrowser_Android.h:332: error: expected '(' before 'AndroidEGLWindow'
/home/mihir/workspace/lab126/ogre_3d/build_dynamic/Samples/include/SampleBrowser_Android.h:332: error: 'AndroidEGLWindow' was not declared in this scope
/home/mihir/workspace/lab126/ogre_3d/build_dynamic/Samples/include/SampleBrowser_Android.h:332: error: expected primary-express
I am getting these errors when I compile sim_routing.cc program by this command
../../bin/cxx sim_routing.cc
g++ -Wall -o sim_routing sim_routing.cxx
following errors are produced:
../../common/priority_q.h : In member function 'bool guardedQueue<ITEM>::Validate(Const char*);
error : there are no argument to 'strcat' that depend on template parameter so a declaration of 'strcat' must be avaible.
error : <if you use -fpermissive g++ will accept your code but allowing use of undeclared name is deprecated>
When I tried to change commom/priority_q.h, it shows it is read only; file changes cannot be accepted.
How these errors can be removed?
#include <cstring> before the header triggering your error.