You are not logged in.
Hi!
I'm studying physics in the first year and I have one course in C++. They gave use libraries for it but I couldn't make it work on arch linux. It is supposed to work out-of-the-box after unpacking and "make install" it. But that's not the case. When I try to compile something that uses X-libs it doesn't work.
(I went through the semester without these libs because they are not that important but I think I'll take a look before the exam in August. )
Warning: If you make install it, it overwrites '~/.emacs'. (make install is in progs/libraries)
Here's the link of the site (german):
http://www.ti.inf.ethz.ch/ew/courses/In … rball.html
Here's the tarball to use:
http://www.ti.inf.ethz.ch/ew/courses/In … _Linux.tgz
I'd be really happy if somebody would take a look or give me a link to make this work.
(BTW: If someone is bored/interested, he can take a look at the lindenmayer-challenge I couldn't do because I couldn't use these libs. )
Thanks in advance :-) ,
Maximalminimalist
Last edited by Maximalminimalist (2010-06-02 17:42:13)
Offline
You should try to be more clear when you say "it doesn't work.", like what error messages are you getting? You probably just need to install the development libraries it needs, but you'll have to figure out what those are.
Offline
You're probably right. Sorry.
One example: There's lindenmayer.cpp
// Prog: lindenmayer.cpp
// Draw turtle graphics for the Lindenmayer system with
// production F -> F+F+ and initial word F.
#include <iostream>
#include <IFM/turtle>
// POST: the word w_i^F is drawn
void f (const unsigned int i) {
if (i == 0)
ifm::forward(); // F
else {
f(i-1); // w_{i-1}^F
ifm::left(90); // +
f(i-1); // w_{i-1}^F
ifm::left(90); // +
}
}
int main () {
std::cout << "Number of iterations =? ";
unsigned int n;
std::cin >> n;
// draw w_n = w_n(F)
f(n);
return 0;
}
Compiling:
g++ lindenmayer.cpp
lindenmayer.cpp:6:22: fatal error: IFM/turtle: No such file or directory
compilation terminated.
The turtle lib is (I think) in
~/progs/libraries/include/IFM/turtle
They also say that the xorg-dev package is needed. Here in Arch Linux 'base-devel' is the one I need (and already have)?
Offline
Set full path to the library?
Offline
The turtle lib is (I think) in
~/progs/libraries/include/IFM/turtle
This is not in the standard search path. judging from the error message,
I think you need to specify the path of the library using -I when compiling
and -L when linking in g++.
Offline
You can just use
make lindenmayer
or manually set the required compiler flags:
g++ -I ~/IFMP/libwindow/include -L ~/IFMP/libwindow/lib/ lindenmayer.cpp -lturtle -lwindow -lX11
P.S. Of course I haven't noticed your warning. Fortunately I use vim and therefore I haven't lost a thousand lines of elisp code
Offline
Thanks for your help. I'll try to deal with what you told me.
EDIT: Haven't seen Atragor's post. You're my new god. Thanks a lot! You made me save a lot of time.
(Now you can play with lindenmayer. )
P.S. I'm using vim too.
Last edited by Maximalminimalist (2010-06-02 17:42:52)
Offline
i think eirika is correct. The way chosen is the correct way and it almost works. Hope everyone here is satisfied with that reply.
Offline