Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Use unidata netcdf libraries
icon5.gif  Use unidata netcdf libraries [message #1758135] Thu, 23 March 2017 19:17 Go to next message
Roberto Vettor is currently offline Roberto VettorFriend
Messages: 1
Registered: March 2017
Junior Member
Hi to everyone,
I'm new in the forum (and in Eclipse). I'm a researcher working on ship weather routing, developing a program in C++ (with a MacBook Pro).
I need to deal with weather data and I was trying to use the "unidata netcdf" libraries at this scope.
I downloaded and installed the libraries, but don't know how to tell Eclipse that I want to use them.

Alternatively, I have the functions that would do what I need written in Python, but I don't know how to call them from C++ in Eclipse.

Both the solutions would be fine for me. Any suggestion?


Thank you in advance!
Roberto
Re: Use unidata netcdf libraries [message #1758240 is a reply to message #1758135] Sat, 25 March 2017 15:13 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Eclipse is mostly an editor with additional functionality to run external programs to build a project.
It doesn't know much about calling conventions.
That's something peculiar to the external compiler.

If you want to call Python code from C++ then you should google how to do that.
Here's one such link: https://www.coveros.com/calling-python-code-from-c/
There are many more.

Eclipse needs to know the location (path to) the include headers and libraries to build a Makefile assuming you want one built.

You d this by modifying the Tool Settings for the compiler and inker.
The Tool Settings tab is under Project-->Properties-->C/C++ Build-->Settings
Select Includes under the appropriate compiler and set the header locations in the pane labeled (Include Paths -I)
Select Libraries under the linker and set the panes appropriately.

the Indexer must also be informed of the path(s) to the headrs or you will get spurious errors when editing.
You do this by setting the path to the library headers under the CDT User Setting Entries found in the Entries tab of Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc.

[Updated on: Sat, 25 March 2017 15:35]

Report message to a moderator

Previous Topic:Program file does not exist error when using SDL library
Next Topic:resolve symbolic links / linux
Goto Forum:
  


Current Time: Tue Mar 19 02:14:58 GMT 2024

Powered by FUDForum. Page generated in 0.02245 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top