The Problem:
So, I'm writing an application in C that uses the glib's hash table function. Unfortunately, because Homebrew installs glib into a subdirectory, pre-written includes are broken, and it completely fails to compile. Part of the problem is related to the tendency glib has to hide itself, but I'm aware of how to solve this, and have written a makefile that works. However, I would still prefer to be able to use my IDE as usual, and this seems like it may cause other problems in the future, so I am wondering whether anybody has any advice.
Below is the makefile, cmakelists.txt and errors.
Please note that my problem is not including CMake, it is due to the fact that Homebrew has installed it to /usr/lib/local/glib-2.0/glib.h, and the header files it includes are under /usr/lib/local/glib-2.0/glib/. Unfortunately, all of glibs header include the others as such
#include <glib/galloca.h>
#include <glib/garray.h>
#include <glib/gasyncqueue.h>
#include <glib/gatomic.h>
#include <glib/[...]>
where these should be
#include <glib-2.0/glib/galloca.h>
#include <glib-2.0/glib/garray.h>
e.t.c, You get the idea
Makefile
# Compiler
CC = gcc
#CFlags
CFlags = -g -Wall -I/usr/local/Cellar/glib/2.46.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.46.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -L/usr/local/Cellar/glib/2.46.2/lib -L/usr/local/opt/gettext/lib -lglib-2.0 -lintl -D_REENTRANT -I/usr/local/Cellar/gtk+3/3.18.9/include/gtk-3.0 -I/usr/local/Cellar/glib/2.46.2/include/gio-unix-2.0/ -I/usr/local/Cellar/cairo/1.14.6_1/include/cairo -I/usr/local/Cellar/libepoxy/1.3.1/include -I/usr/local/Cellar/pango/1.38.1/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/1.2.4/include/harfbuzz -I/usr/local/Cellar/pango/1.38.1/include/pango-1.0 -I/usr/local/Cellar/atk/2.18.0_1/include/atk-1.0 -I/usr/local/Cellar/cairo/1.14.6_1/include/cairo -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.11.1_2/include -I/usr/local/Cellar/freetype/2.6.3/include/freetype2 -I/usr/local/Cellar/libpng/1.6.21/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.32.3/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/1.6.21/include/libpng16 -I/usr/local/Cellar/glib/2.46.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.46.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include
TARGET = main
all: $(TARGET)
$(TARGET): $(TARGET).c
$(CC) $(CFlags) -o $(TARGET) $(TARGET).c
clean:
$(RM) $(TARGET)
Compile Errors
/Applications/CLion.app/Contents/bin/cmake/bin/cmake --build /Users/ennis/Library/Caches/CLion12/cmake/generated/85d4a0ab/85d4a0ab/Debug --target all -- -j 4
[ 50%] Building C object CMakeFiles/TaskAppBuilder_C.dir/main.c.o
In file included from /Users/ennis/TaskAppBuilder-C/main.c:4:
In file included from /Users/ennis/TaskAppBuilder-C/main.h:15:
In file included from /Users/ennis/TaskAppBuilder-C/glib.h:30:
/usr/local/include/glib-2.0/glib.h/galloc.h:32:10: fatal error: 'galloc.h' file not found
#include <galloc.h>
^
1 error generated.
make[2]: *** [CMakeFiles/TaskAppBuilder_C.dir/main.c.o] Error 1
make[1]: *** [CMakeFiles/TaskAppBuilder_C.dir/all] Error 2
make: *** [all] Error 2
CMakeLists.txt
cmake_minimum_required(VERSION 3.3)
project(TaskAppBuilder_C)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c11")
set(SOURCE_FILES main.c main.h)
add_executable(TaskAppBuilder_C ${SOURCE_FILES} main.c main.h)
Related
I am trying to incorporate yaml-cpp into my project.
I have a "Demes" class where I need to parse a YAML file.
This is the relevant method in Demes.cpp:
#include "Demes.hpp"
void Demes::parse(const std::string& fileName)
{
YAML::Node test = YAML::LoadFile(fileName);
}
where Demes.hpp includes the yaml-cpp headers and declares the 'parse' method.
Building with make -VERBOSE=1 (as suggested by #Tsyvarev) gives:
[100%] Linking CXX executable momentspp
cd /home/gvbarroso/Devel/momentspp/build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/momentspp.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++20 -Weffc++ -Wshadow -Wall -Wextra -ffast-math -O3 -march=native CMakeFiles/momentspp.dir/Log.cpp.o CMakeFiles/momentspp.dir/PolymorphismData.cpp.o CMakeFiles/momentspp.dir/SumStatsLibrary.cpp.o CMakeFiles/momentspp.dir/Drift.cpp.o CMakeFiles/momentspp.dir/Migration.cpp.o CMakeFiles/momentspp.dir/Mutation.cpp.o CMakeFiles/momentspp.dir/Recombination.cpp.o CMakeFiles/momentspp.dir/Epoch.cpp.o CMakeFiles/momentspp.dir/Model.cpp.o CMakeFiles/momentspp.dir/OptimizationWrapper.cpp.o CMakeFiles/momentspp.dir/Demes.cpp.o CMakeFiles/momentspp.dir/main.cpp.o -o momentspp -Wl,-rpath,/home/gvbarroso/.local/lib: /home/gvbarroso/.local/lib/libbpp-phyl3.so.1.0.0 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.74.0 /home/gvbarroso/.local/lib/libbpp-seq3.so.1.0.0 /home/gvbarroso/.local/lib/libbpp-core3.so.1.0.0
/usr/bin/ld: CMakeFiles/momentspp.dir/Demes.cpp.o: in function Demes::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': Demes.cpp:(.text+0x4c): undefined reference to YAML::LoadFile(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: Demes.cpp:(.text+0x12c): undefined reference to `YAML::operator<<(std::ostream&, YAML::Node const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/momentspp.dir/build.make:277: src/momentspp] Error 1
make[2]: Leaving directory '/home/gvbarroso/Devel/momentspp/build'
make[1]: *** [CMakeFiles/Makefile2:125: src/CMakeFiles/momentspp.dir/all] Error 2
make[1]: Leaving directory '/home/gvbarroso/Devel/momentspp/build'
make: *** [Makefile:156: all] Error 2
I am using CMake to build my project, but I am still fairly unfamiliar with it.
EDIT: I forgot to mention that I have two CMakeLists.txt files, one inside src and the other inside the external build.
The start of my CMakeLists.txt file in the external build is:
cmake_minimum_required (VERSION 3.5.0)
project (momentspp CXX)
SET(CMAKE_CXX_FLAGS "-std=c++20 -Weffc++ -Wshadow -Wall -Wextra -ffast-math -O3 -march=native")
And the part of it where I look for yaml-cpp is:
FIND_PACKAGE(yaml-cpp REQUIRED)
IF(yaml-cpp_FOUND)
INCLUDE_DIRECTORIES(${yaml-cpp_INCLUDE_DIRS})
SET(LIBS {yaml-cpp_LIBRARIES})
MESSAGE("-- yaml-cpp libraries found here:")
MESSAGE(" includes: ${yaml-cpp_INCLUDE_DIRS}")
ENDIF()
My full CMakeLists.txt file inside src is:
SET(momentspp_CPP
Log.cpp
PolymorphismData.cpp
SumStatsLibrary.cpp
Drift.cpp
Migration.cpp
Mutation.cpp
Recombination.cpp
Epoch.cpp
Model.cpp
OptimizationWrapper.cpp
Demes.cpp
main.cpp
)
ADD_EXECUTABLE (momentspp ${momentspp_CPP})
SET(momentspp-targets momentspp)
FOREACH (target ${momentspp-targets})
TARGET_LINK_LIBRARIES(${target} ${BPP_LIBS_SHARED} ${BOOST_LIBS_SHARED} ${EIGEN3_LIBS_SHARED} ${yaml-cpp_LIBS_SHARED})
TARGET_LINK_LIBRARIES (${target} ${LIBS})
ENDFOREACH (target)
INSTALL(TARGETS ${momentspp-targets} DESTINATION ${CMAKE_INSTALL_BINDIR})
and this was working prior to the inclusion of yaml-cpp.
This feels like a rather complicated CMake set-up, but I am copying and editing it from a previous project where someone else helped me with it.
How can I fix the linking issue?
I tried looking similar questions around here, but couldn't get their solutions to work for me (apparently those people where not using CMake to build their projects).
Thank you,
Gustavo
I hate cmake, as I always seem to spend more time trying to get cmake to compile and build a program than I do writing and debugging the program cmake is supposed to be building.
Anyway, the latest problem is this.
I have some code that starts ...
#include <mrpt/obs/CObservationBatteryState.h>
#include <mrpt/obs/CObservationComment.h>
#include <mrpt/obs/CObservation2DRangeScan.h>
#include <mrpt/maps/CSimplePointsMap.h>
#include <mrpt/comms/CSerialPort.h>
#include <mrpt/poses/CPose3D.h>
#include <mrpt/system/os.h>
a fairly simple CMakeLists.txt that looks like...
project(some_sort_of_name)
cmake_minimum_required(VERSION 3.8)
find_package(MRPT COMPONENTS obs maps comms )
if(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
endif()
add_executable(lidar lidar.c)
add_executable(lidar_obs lidar_obs.cpp)
target_link_libraries(lidar_obs mrpt::obs mrpt::maps)
And the compilation fails with...
[ 50%] Built target lidar
[ 75%] Building CXX object CMakeFiles/lidar_obs.dir/lidar_obs.cpp.o
/home/mike/work/minipupper/lidar/lidar_obs.cpp:5:10: fatal error: mrpt/comms/CSerialPort.h: No such file or directory
5 | #include <mrpt/comms/CSerialPort.h>
So it is happy with compiling & building "lidar" which is a simple 'C' program with no calls to MRPT, but when it comes to compiling lidar_obs, it is happy to find the include files for obs and maps but not comms.
The include files are there, i.e.
$ ls /usr/include/mrpt/comms/include/mrpt
comms comms.h
$ ls /usr/include/mrpt/comms/include/mrpt/comms
CClientTCPSocket.h CInterfaceFTDI.h CSerialPort.h CServerTCPSocket.h net_utils.h nodelets.h registerAllClasses.h
just like e.g. obs & maps
$ ls /usr/include/mrpt/obs
include
$ /usr/include/mrpt/obs/include
mrpt
$ ls /usr/include/mrpt/obs/include/mrpt
maps obs obs.h
$ ls /usr/include/mrpt/obs/include/mrpt/maps
CMetricMapEvents.h CMetricMap.h CSimpleMap.h metric_map_types.h TMetricMapInitializer.h TMetricMapTypesRegistry.h
What is going on with cmake ? How does it find some files and not others.
You were missing the link command to also include the mrpt-comms library:
target_link_libraries(lidar_obs mrpt::obs mrpt::maps mrpt::comms)
# ^^^^^^^^^^^
CMake with exported libraries work like that: "linking" an imported cmake target, also includes the "-I" flags (for #includes) apart of the link -l flags themselves.
I'm testing vcpkg (on macOS) with a CMake project.
Since not all vcpkg packages have CMake find modules, I'm trying with a package that doesn't have one: libuuid
This is the directory tree relative to libuuid I can see from the vcpkg root:
$ find packages/libuuid_x64-osx
packages/libuuid_x64-osx
packages/libuuid_x64-osx/include
packages/libuuid_x64-osx/include/uuid
packages/libuuid_x64-osx/include/uuid/uuid.h
packages/libuuid_x64-osx/BUILD_INFO
packages/libuuid_x64-osx/lib
packages/libuuid_x64-osx/lib/libuuid.a
packages/libuuid_x64-osx/CONTROL
packages/libuuid_x64-osx/debug
packages/libuuid_x64-osx/debug/lib
packages/libuuid_x64-osx/debug/lib/libuuid.a
packages/libuuid_x64-osx/share
packages/libuuid_x64-osx/share/libuuid
packages/libuuid_x64-osx/share/libuuid/copyright
Example program:
#include <iostream>
#include <uuid/uuid.h>
int main(int argc, char **argv)
{
std::cout << "Hello, world!" << std::endl;
return 0;
}
Example CMakeLists.txt
cmake_minimum_required(VERSION 3.13)
project(vcpkg_example_project)
add_executable(app app.cpp)
target_link_libraries(app uuid)
If I understand correctly, vcpkg's philosophy is not to provide missing CMake find-modules, but to simply have #include <libfoo/foo.h> work out of the box. And in fact the example above compiles fine. But fails to find -luuid:
$ cmake -DCMAKE_TOOCHAIN_FILE=/Users/me/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake ..
...
$ cmake --build .
Scanning dependencies of target app
[ 50%] Building CXX object CMakeFiles/app.dir/app.cpp.o
[100%] Linking CXX executable app
ld: library not found for -luuid
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [app] Error 1
make[1]: *** [CMakeFiles/app.dir/all] Error 2
make: *** [all] Error 2
What am I missing?
Also, I see there is a installed/x64-osx/lib/libuuid.a. Shouldn't installed/x64-osx/lib automatically added as lib path by the toolchain cmake script?
I'd make a target out of uuid. From what you describe, most probably an Interface Library called uuid. You can add_target_include_directories and target_link_libraries for the headers and any libraries, and then add it to the rest of your project.
So something like this:
add_library(uuid INTERFACE)
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
find_library(LIBUUID uuid "${CMAKE_CURRENT_SOURCE_DIR}/packages/libuuid_x64-osx/lib/")
else()
find_library(LIBUUID uuid "${CMAKE_CURRENT_SOURCE_DIR}/packages/libuuid_x64-osx/debug/lib/")
endif()
target_link_libraries(uuid INTERFACE "${LIBUUID}")
target_include_directories(uuid SYSTEM INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/packages/libuuid_x64-osx/include")
I'd then do an add_subdirectory to the library's folder and link to uuid
I'm just starting to learn how to work with zeromq libraries and using them in different C++ projects.
The sample code that I wrote (actually copied from there tutorials)is this:
// file: main.cpp
// Hello World client in C++
// Connects REQ socket to tcp://localhost:5555
// Sends "Hello" to server, expects "World" back
//
#include <zmq.hpp>
#include <string>
#include <iostream>
int main ()
{
// Prepare our context and socket
zmq::context_t context (1);
zmq::socket_t socket (context, ZMQ_REQ);
std::cout << "Connecting to hello world server…" << std::endl;
socket.connect ("tcp://localhost:5555");
// Do 10 requests, waiting each time for a response
for (int request_nbr = 0; request_nbr != 10; request_nbr++) {
zmq::message_t request (5);
memcpy (request.data (), "Hello", 5);
std::cout << "Sending Hello " << request_nbr << "…" << std::endl;
socket.send (request);
// Get the reply.
zmq::message_t reply;
socket.recv (&reply);
std::cout << "Received World " << request_nbr << std::endl;
}
return 0;
}
and by building the output of this file with the command below:
g++ main.cpp -o test -lzmq
the file will be generated with no problem.
The problem that I have is that I want to build the file using CMake.Thus, I've written a CMakeLists.txt file as below:
cmake_minimum_required(VERSION 3.6)
project(test2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lzmq")
set(SOURCE_FILES main.cpp)
add_executable(test2 ${SOURCE_FILES})
The part that I thought will be enough to build the program is -lzmq but even with that piece included, I get the following error messages:
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::error_t::error_t()':
/usr/include/zmq.hpp:62: undefined reference to `zmq_errno'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::error_t::what() const':
/usr/include/zmq.hpp:66: undefined reference to `zmq_strerror'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::message_t::message_t()':
/usr/include/zmq.hpp:107: undefined reference to `zmq_msg_init'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::message_t::message_t(unsigned long)':
/usr/include/zmq.hpp:114: undefined reference to `zmq_msg_init_size'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::message_t::~message_t()':
/usr/include/zmq.hpp:129: undefined reference to `zmq_msg_close'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::message_t::data()':
/usr/include/zmq.hpp:180: undefined reference to `zmq_msg_data'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::context_t::context_t(int)':
/usr/include/zmq.hpp:204: undefined reference to `zmq_init'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::context_t::~context_t()':
/usr/include/zmq.hpp:225: undefined reference to `zmq_term'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::socket_t::socket_t(zmq::context_t&, int)':
/usr/include/zmq.hpp:251: undefined reference to `zmq_socket'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::socket_t::close()':
/usr/include/zmq.hpp:283: undefined reference to `zmq_close'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::socket_t::connect(char const*)':
/usr/include/zmq.hpp:314: undefined reference to `zmq_connect'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::socket_t::send(zmq::message_t&, int)':
/usr/include/zmq.hpp:321: undefined reference to `zmq_send'
/usr/include/zmq.hpp:324: undefined reference to `zmq_errno'
CMakeFiles/test2.dir/main.cpp.o: In function `zmq::socket_t::recv(zmq::message_t*, int)':
/usr/include/zmq.hpp:331: undefined reference to `zmq_recv'
/usr/include/zmq.hpp:334: undefined reference to `zmq_errno'
Should I set another kind of variable in the CMake file or have I installed the library in a wrong directory? or is there anything else that I should have mentioned?
and The system witch I'm working on is Ubuntu 14.04
CMake doesn't include direct support for 0mq and 0mq doesn't include direct support for CMake. But, 0mq does support pkg-config and we can use this to help us. Since you mentioned that you're on Ubuntu 14.04, make sure you've done sudo apt-get install libzmq3-dev to install the 0mq libraries, headers, and the pkg-config .pc file.
Then use the following CMakeLists.txt which I've modified from your version above. (I've commented all my changes inline.)
## i have cmake 3.5
cmake_minimum_required(VERSION 3.5)
project(test2)
## use this to globally use C++11 with in our project
set(CMAKE_CXX_STANDARD 11)
## load in pkg-config support
find_package(PkgConfig)
## use pkg-config to get hints for 0mq locations
pkg_check_modules(PC_ZeroMQ QUIET zmq)
## use the hint from above to find where 'zmq.hpp' is located
find_path(ZeroMQ_INCLUDE_DIR
NAMES zmq.hpp
PATHS ${PC_ZeroMQ_INCLUDE_DIRS}
)
## use the hint from above to find the location of libzmq
find_library(ZeroMQ_LIBRARY
NAMES zmq
PATHS ${PC_ZeroMQ_LIBRARY_DIRS}
)
set(SOURCE_FILES main.cpp)
add_executable(test2 ${SOURCE_FILES})
## add the include directory to our compile directives
target_include_directories(test2 PUBLIC ${ZeroMQ_INCLUDE_DIR})
## at the 0mq library to our link directive
target_link_libraries(test2 PUBLIC ${ZeroMQ_LIBRARY})
Now you can make your project.
❯ make
[ 50%] Building CXX object CMakeFiles/test2.dir/main.cpp.o
[100%] Linking CXX executable test2
[100%] Built target test2
If you want to see what's happening under the hood, do a verbose make.
❯ make VERBOSE=1
/usr/bin/cmake -H/home/nega/foo -B/home/nega/foo/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/nega/foo/build/CMakeFiles /home/nega/foo/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/nega/foo/build'
make -f CMakeFiles/test2.dir/build.make CMakeFiles/test2.dir/depend
make[2]: Entering directory '/home/nega/foo/build'
cd /home/nega/foo/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/nega/foo /home/nega/foo /home/nega/foo/build /home/nega/foo/build /home/nega/foo/build/CMakeFiles/test2.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/nega/foo/build'
make -f CMakeFiles/test2.dir/build.make CMakeFiles/test2.dir/build
make[2]: Entering directory '/home/nega/foo/build'
[ 50%] Building CXX object CMakeFiles/test2.dir/main.cpp.o
/usr/bin/c++ -std=gnu++11 -o CMakeFiles/test2.dir/main.cpp.o -c /home/nega/foo/main.cpp
[100%] Linking CXX executable test2
/usr/bin/cmake -E cmake_link_script CMakeFiles/test2.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/test2.dir/main.cpp.o -o test2 /usr/lib/x86_64-linux-gnu/libzmq.so
make[2]: Leaving directory '/home/nega/foo/build'
[100%] Built target test2
make[1]: Leaving directory '/home/nega/foo/build'
/usr/bin/cmake -E cmake_progress_start /home/nega/foo/build/CMakeFiles 0
If you look at the compile line, you'll notice that
C++11 support was added (with the -std=gnu++11 flag)
There's no -I/path/to/zmq flag. That's because Ubuntu dumps zmq.hpp in to /usr/include and CMake is smart enough to know that is a default path, so it does nothing
If you look at the link line, you'll notice that libzmq.so has been included via it's full path. Some people don't like that (myself included) and prefer -L/lib/dir -lmylib instead. Using the full path is "the CMake way", and you'll actually come to appreciate it as you grow with CMake and use it for larger and more complicated projects (you still might not like it though.)
Also note, that since you're on Ubuntu we could have cheated and used dpkg -L libzmq3-dev to find the locations of the files we're interested in then added them to your original CMAKE_CXX_FLAGS line, but that's cheating and more importantly, not portable.
A cmake config file has been added to libzmq github repository Jan 7, 2017 here.
This is not included in the latest release (4.2.1) yet, but I belive it should be in the next release.
I have installed the head version using cmake and then installed cppzmq, which uses find_package(ZeroMQ REQUIRED) to locate libzmq. All worked like a charm.
EDIT: The cmake config file is included in release 4.2.2 here. Then it was moved to directory builds/cmake at release 4.2.4. I didn't test it again but find_package(ZeroMQ REQUIRED) should just work since ibzmq 4.2.2.
This works as well
cmake_minimum_required(VERSION 3.6)
project(test)
add_executable(c main.cpp)
target_link_libraries(c zmq)
Could you, please, help me with this error. I'm trying to install alize-1.4 on Ubuntu from this site http://mistral.univ-avignon.fr/download_en.html. But I get such error at the end
make[1]: Leaving directory `/home/admin-pc/alize/src'
make: *** [all-recursive] Error 1 cp: cannot stat `src/libalize.a': No
such file or directory
Maybe someone of you used ALIZE code?
Thanks
So, according to the log the real error is
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libalize\" -DVERSION=\"0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -O3 -ffast-math -Wall -march=pentium4 -MT SegServerFileWriter.o -MD -MP -MF .deps/SegServerFileWriter.Tpo -c -o SegServerFileWriter.o SegServerFileWriter.cpp
SegServerFileWriter.cpp: In member function void alize::SegServerFileWriter::writeSegServerTrs(const alize::SegServer&):
SegServerFileWriter.cpp:299: error: 'qsort' was not declared in this scope
make[1]: *** [SegServerFileWriter.o] Error 1
This type of error is quite common when you compile old style C++ projects with newer gcc due to the restrictions of the new compiler
The easy way would be just to checkout the latest code with subversion, it has all such issues fixed:
svn checkout http://alize.univ-avignon.fr/svn/ALIZE/trunk/
Or to add #include <cstdlib> into the file header to import the qsort declaration.