Compilation impossible.

Questions, Discussions, Aides, Conseils, pour les Francophones.

Moderators: mtnviewmark, MtnViewJohn, chris

Post Reply
G3org
Posts: 3
Joined: Mon Dec 22, 2008 7:58 am

Compilation impossible.

Post by G3org » Mon Dec 22, 2008 8:04 am

Bonjour à tous !


Voilà, je souhaite compiler Context Free Art à partir des sources (ContextFreeSource2.2beta2.tgz), j'ai installé bison (2.3) et flex (2.5.35).

Quand je lance make, cela me donne :

Code: Select all

src-common/makeCFfilename.cpp: In function ‘std::string makeCFfilename(const char*, int, int, int)’:
src-common/makeCFfilename.cpp:44: erreur: ‘strchr’ was not declared in this scope
make: *** [objs/makeCFfilename.o] Erreur 1
:cry:

Merci pour votre aide.

User avatar
MtnViewJohn
Site Admin
Posts: 849
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn » Mon Dec 22, 2008 8:52 am

Add

Code: Select all

#include <string.h>
to makeCFfilename.cpp

Context Free is missing many include file directives because older versions of gcc compile Context Free even though the include files are missing. Newer versions of gcc are more strict, so Context Free will not compile with them. I will fix this as soon as I get access to a newer version of gcc.

G3org
Posts: 3
Joined: Mon Dec 22, 2008 7:58 am

Post by G3org » Mon Dec 22, 2008 11:16 am

Merci pour cette réponse rapide.
Thanx for responding so quickly.

J'ai bien rajouté
I've added

Code: Select all

#include <string.h>
dans le fichier makeCFfilename.cpp
in makeCFfilename.cpp

Mais aussi :
I've also added :

Code: Select all

#include <stdlib.h>
dans les fichiers suivants :
in the following files :
  • yglue.cpp
  • tiledCanvas.cpp
  • posixSystem.cpp
Maintenant, ça marche :P
Now, it's ok :P

Il y a aussi des avertissement sur certaines conversions et l'utilisation de mktemp :
There are some deprecated conversions and a warning about mktemp :

Code: Select all

src-common/yglue.cpp: In function ‘char* yg_BuildString(const char*)’:
src-common/yglue.cpp:72: attention : deprecated conversion from string constant to ‘char*’

Code: Select all

src-unix/pngCanvas.cpp: In member function ‘void pngCanvas::output(const char*, int)’:
src-unix/pngCanvas.cpp:154: attention : deprecated conversion from string constant to ‘char*’
src-unix/pngCanvas.cpp:155: attention : deprecated conversion from string constant to ‘char*’

Code: Select all

objs/posixSystem.o: In function `PosixSystem::tempFileForWrite(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
posixSystem.cpp:(.text+0x396): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
Maintenant, je vais essayer ce joli projet.
Now, let's try your nice project.

Sorry for my awful English.

User avatar
MtnViewJohn
Site Admin
Posts: 849
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn » Wed Dec 24, 2008 10:44 am

I can fix all of the warnings except for the one about mktemp. We have decided to not worry about mktemp.

Can you type in
gcc -v
so that we can determine what environment compilation fails under. I have tried compiling Context Free under Ubuntu Intrepid Ibex and I received some of these warnings, but it does compile.

G3org
Posts: 3
Joined: Mon Dec 22, 2008 7:58 am

Post by G3org » Wed Dec 24, 2008 11:02 am

I can fix all of the warnings except for the one about mktemp.
Great !
We have decided to not worry about mktemp.
Ok.
Can you type in gcc -v
My gcc version is 4.3.2
I have tried compiling Context Free under Ubuntu Intrepid Ibex and I received some of these warnings, but it does compile.
Compilation is ok for me too (from Mon Dec 22, 2008 6:16 pm) :
Maintenant, ça marche :P
Now, it's ok :P
I've tried some examples of the Gallery section. Awesome !
I'm having a look in the Documentation (in fact, I'm trying to translate it in French to oblige me to understand).
Continue to develop this great program !

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest