I'm very new in ubuntu, eclipse and itpp world.
I'm trying to install itpp and debugs the cpp file in eclipse.
In wikipedia there are two command line:
sudo apt-get install libitpp-dev
g++ itpp-config --cflags example.cc itpp-config --libs
and everything works.
But in eclipse there are many errors like:
"/home/marco/workspace/example0/Debug/../src/example0.cpp:21: riferimento non definito a "itpp::linspace(double, double, int)""
Debug doesn't work!!
I tried also to use:
% mkdir build
% cd build
% cmake ..
% make
% make install
but also in this way i don't understand in which way I can link the library.
Please help me!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are two different questions in your message:
how to compile and run a program with Eclipse: I haven't used Eclipse recently, but you could use a project with Makefiles and then use itpp-config flags to compile a debug version. You need to use the debug flags. Then open the binary in eclipse and debug as usually
how to install IT++ from Eclipse: use cmake generator for Eclipse CDT, so the third step should be:
cmake .. -G "Eclipse CDT4 - Unix Makefiles"
The above described procedure can be used to compile and install IT++ from command line, once IT++ installed you could use Eclipse to compile your program using Makefiles for example
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here is a possible way of compiling your code with IT++ from Eclipse:
- create a 'Makefile Project with Existing Code'
- select the folder where the sources reside
- goto Project->Make Target->Create ...
- use as 'Target Name' the name of your file without the '.cpp' prefix
- in the left pannel switch the view to 'Make Target'. The previous target name should appear here
- double click the target name. Your file should compile if in the source folder there is a Makefile with the following content:
Hi,
I'm very new in ubuntu, eclipse and itpp world.
I'm trying to install itpp and debugs the cpp file in eclipse.
In wikipedia there are two command line:
sudo apt-get install libitpp-dev
g++
itpp-config --cflags
example.ccitpp-config --libs
and everything works.
But in eclipse there are many errors like:
"/home/marco/workspace/example0/Debug/../src/example0.cpp:21: riferimento non definito a "itpp::linspace(double, double, int)""
Debug doesn't work!!
I tried also to use:
% mkdir build
% cd build
% cmake ..
% make
% make install
but also in this way i don't understand in which way I can link the library.
Please help me!!!
There are two different questions in your message:
how to compile and run a program with Eclipse: I haven't used Eclipse recently, but you could use a project with Makefiles and then use itpp-config flags to compile a debug version. You need to use the debug flags. Then open the binary in eclipse and debug as usually
how to install IT++ from Eclipse: use cmake generator for Eclipse CDT, so the third step should be:
cmake .. -G "Eclipse CDT4 - Unix Makefiles"
The above described procedure can be used to compile and install IT++ from command line, once IT++ installed you could use Eclipse to compile your program using Makefiles for example
Sorry is several day that try to create a make file in eclipse.
Can give me more detail about how to create the progect?
I hace the main.cpp, bbb.h and comm.h (the file .h included in main).
Sorry for the stupid question
Here is a possible way of compiling your code with IT++ from Eclipse:
- create a 'Makefile Project with Existing Code'
- select the folder where the sources reside
- goto Project->Make Target->Create ...
- use as 'Target Name' the name of your file without the '.cpp' prefix
- in the left pannel switch the view to 'Make Target'. The previous target name should appear here
- double click the target name. Your file should compile if in the source folder there is a Makefile with the following content:
If you need to compile your file in debug mode use as target name 'fileName_d'
This is one possible approach, another one is to use cmake and to generate directly Eclipse project files.
Last edit: Bogdan Cristea 2013-07-31