How to install external libriaries?

Started by panos, February 17, 2016, 08:43:16 PM

Previous topic - Next topic

panos

Hi i am new to c and pelles c compiler. I am trying to install a library that comes with an online course. Cs50.h. I copied cs50.h to the include folder and also i compiled the cs50.c to cs50.lib. Then i copied the cs50.lib into the library directory on the pelles c installation. But the compiler still doesnt understand functions from cs50 library.

TimoVJL

You can include lib in IDE from menu Project -> Project options... -> Linker -> Library and object files
and project path Project -> Project options... -> Folders -> Libraries
if source code...
#pragma comment(lib, "cb50.lib")
...
May the source be with you

panos

I dont understand what i am doing wrong. I did what you wrote and still get this error POLINK: error: Unresolved external symbol '_GetInt'.

GetInt is a function from the library.

TimoVJL

When you create library, it was  probably using __stdcall convention,
so chance it to __cdecl.
May the source be with you

panos