Re: [Anjuta-list] Including a library in Anjuta



Hi!

> I am a statistician and new to C++ and Anjuta, so have basic question
> regarding the inclusion of libraries. If you are not the right person to
> address this to, please let me know who to contact. 

Please use the anjuta-list for this kind of questions (CC'd).


> What do I need to do next, so that the make file includes the correct
> links to the library? Do I need to add a new target? And / or new source
> files? If new source files, which files (the library .a or the header
> files .h)? Which file do I choose as a target? 

Well, your target is the name of your executable, so in your case it's
probably just called hello or hello-world and lives as a root node in
the tree that you see in the "Project" pane.

Use the context menu to go to the "Properties" window and click on
"Advanced". Then add

-I/usr/include/newmat to the preprocessor flags and
-lnewmat to the linker flags

Unfortunately libnewmat doesn't use the standard way to find libraries
on linux which is pkg-config. That means you will have difficult times
to detect these paths correctly in case you want to use your application
on another system.

Regards,
Johannes

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]