User forums > Help

Help with setup

(1/2) > >>

fanotto:
Hi

I have installed Code::Blocks on a Debian 64b computer. I have some old cb project files which now do not work because cb does not find the included libraries (like <vector> and <time.h> or <glut.h>)and errors like "error: ‘srand’ was not declared in this scope". Do I have to declare the paths somewhere? Where?

Jenna:
You don't need paths for standard libs, and the path to glut.h should already be set in your old project (if it has worked).

You are just missing some header files that are in dev-packages like libstdc++6-x.x-dev, linux-libc-dev, freeglut3-dev .
I guess you are also missing (at least) the g++-package (it depends on libstdc++6-x.x-dev) and most likely some more.

fanotto:

--- Quote from: jens on December 06, 2008, 10:14:45 am ---You don't need paths for standard libs, and the path to glut.h should already be set in your old project (if it has worked).
--- End quote ---

The old projects have worked.


--- Quote from: jens on December 06, 2008, 10:14:45 am ---You are just missing some header files that are in dev-packages like libstdc++6-x.x-dev, linux-libc-dev, freeglut3-dev .
I guess you are also missing (at least) the g++-package (it depends on libstdc++6-x.x-dev) and most likely some more.

--- End quote ---

I have all the packages you mention. So it have to be "some more".

I can locate the files and it looks ok to me.

:~$ locate glut.h
/usr/include/GL/freeglut.h
/usr/include/GL/glut.h
/usr/share/doc/freeglut3-dev/freeglut.html

:~$ locate time.h
/usr/include/mf-runtime.h
/usr/include/time.h
/usr/include/utime.h
/usr/include/bits/time.h
/usr/include/linux/time.h
/usr/include/linux/utime.h
/usr/include/sys/time.h
/usr/include/wx-2.8/wx/datetime.h
+ many more references.


edit: As for g++ I have plain g++ 4.3.2, not multilib version. I am not sure what the differences are.


Jenna:
In this case, please turn on full commandline logging and post the build log output:

Change "Settings -> Compiler and debugger... -> Global compiler settings -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline".

fanotto:
-------------- Build: Debug in slange ---------------

g++ -Wall  -g    -I/usr/include  -c /home/xemil/c++/Slangespill/Color.cpp -o obj/Debug/Slangespill/Color.o
/home/xemil/c++/Slangespill/Color.cpp: In member function ‘std::string Color::getColorString()’:
/home/xemil/c++/Slangespill/Color.cpp:85: warning: control reaches end of non-void function
gcc -Wall  -g    -I/usr/include  -c /home/xemil/c++/Slangespill/FrameTimer.c -o obj/Debug/Slangespill/FrameTimer.o
g++ -Wall  -g    -I/usr/include  -c /home/xemil/c++/Slangespill/Main.cpp -o obj/Debug/Slangespill/Main.o
g++ -Wall  -g    -I/usr/include  -c /home/xemil/c++/Slangespill/Point2D.cpp -o obj/Debug/Slangespill/Point2D.o
g++ -Wall  -g    -I/usr/include  -c /home/xemil/c++/Slangespill/Scene.cpp -o obj/Debug/Slangespill/Scene.o
g++ -Wall  -g    -I/usr/include  -c /home/xemil/c++/Slangespill/Tid.cpp -o obj/Debug/Slangespill/Tid.o
g++ -Wall  -g    -I/usr/include  -c /home/xemil/c++/Slangespill/Viewer.cpp -o obj/Debug/Slangespill/Viewer.o
g++ -Wall  -g    -I/usr/include  -c /home/xemil/c++/Slangespill/former.cpp -o obj/Debug/Slangespill/former.o
/home/xemil/c++/Slangespill/former.cpp: In member function ‘void Base::setRPosition()’:
/home/xemil/c++/Slangespill/former.cpp:43: error: ‘srand’ was not declared in this scope
/home/xemil/c++/Slangespill/former.cpp:44: error: ‘rand’ was not declared in this scope
Process terminated with status 1 (0 minutes, 3 seconds)
2 errors, 1 warnings

Navigation

[0] Message Index

[#] Next page

Go to full version