Page 1 of 1

libraries problem

Posted: Sat Oct 03, 2020 1:09 pm
by francky
Hi, i'm new with codelite, so my understanding isn't great... ^^

Your codelite version 14.0
Your OS : ubuntu 20.04
Compiler version : GCC

I guess the answer is easy but i didn't find the response.

I have found a project on the net, it uses some libraries that i don't have.
The libraries are :

#include <iostream>
#include <fstream>
#include <process.h>
#include <string>
#include <stdlib>
#include <stdio>

#include <cctype>
#include <conio>
#include <dos>


In bold, the libraries that i don't have.

FIrst question, when i search a library on wikipedia for example, it gives :
Implementations

Given the fact there is no standard on which to base the implementation, the functions declared by process.h differ, depending on the compiler in use. Below is a list of compilers which provide process.h.

DJGPP[3][4]
OpenWatcom,[5][6]
Digital Mars[7][8]
MinGW[9]
Microsoft Visual C++[10]
Borland Turbo C, 2.0 and later[11][12]
Lcc32[13]
QNX Neutrino QCC 6.x[14]
Does it means that the libraries come with the compiler? I believed that the libraires was downloaded when i have downloaded Codelite.

I think that my error is because i use ubuntu but i'm note sure...

So if i have to add the libraries "manually", what is the process to adding the libraries?

Thank you !! (Sorry for my english ^^)

Re: libraries problem

Posted: Sat Oct 03, 2020 4:58 pm
by DavidGH
Hi,

This is not really a CodeLite issue, but:
I have found a project on the net, it uses some libraries that i don't have.
The libraries are :
#include <iostream>...
No they aren't libraries. Those are #includes for header files, needed to compile the project. Once it is compiled, you need the libraries installed to link the project and later to run it.

You use ubuntu. Includes like <string> and <stdio> mean you need to have installed the appropriate -dev packages; for example, to compile a program that uses gtk+3 you would first do:
sudo apt install libgtk-3-dev.

One way to find which packages you need to install is to enter each #include line in your favourite search engine. However, if you do that for "#include <dos>" you will learn that it is Windows-specific, so you won't find it in apt. If you absolutely must build that particular project, you would have to discover exactly what the program needs from that header, and find a suitable replacement that is available on Linux.

Instead I suggest you forget that project and choose another. BTW, CodeLite does come with a variety of starter projects. Create or open a Workspace, then right-click on its name and choose New > New Project.

Regards,

David

Re: libraries problem

Posted: Sat Oct 03, 2020 5:52 pm
by francky
ok, thank you David !