|
Re: how to install zoil ineclipse c++ neon [message #1778650 is a reply to message #1778568] |
Tue, 19 December 2017 10:19 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
Presumably you are asking how to setup Eclipse CDT to use SOIL which you've installed on your system.
If you are also asking how to install it on your system, that depends on your system and is generally outside of the scope of this forum.
This may provide some guidance: https://stackoverflow.com/questions/18886598/how-do-i-install-soil-simple-opengl-image-loader
One of the answers is how to install it in Windows: https://stackoverflow.com/a/33861210/3312726
To setup Eclipse you need to do two things:
1) inform the Indexer where the header files are located
The indexer facilitates source code analysis and needs to read the necessary header files.
2a) tell Eclipse where the header files are so that a compile makefile recipe can be built
2b) tell Eclipse where the libraries are located to link them
For (1), if the headers aren't installed in the builtin path used by the compiler, you will need to add them
to Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Entries --> CDT User Settings Entries
Here's an example: https://www.eclipse.org/forums/index.php?t=msg&th=1090598&goto=1778529&#msg_1778529
For (2a), if you installed SOIL as a system package and are using Linux, you can
tell thecompiler where the header files are with
Project --> Properties --> C/C++ Build --> Settings --> Tool Settins tab --> (c and/or c++) compiler --> Miscellaneous
adding: `pkg-config --cflags opencv` (for open CV in this case; note the backtics)
Otherwise, you will need to add them to the compile settings:
Project --> Properties --> C/C++ Build --> Settings --> Tool Settins tab --> (c and/or c++) compiler --> Includes
And for linking (2b), if installed as a package you can use pkg-config
Project --> Properties --> C/C++ Build --> Settings --> Tool Settins tab --> linker --> Miscellaneous
adding: `pkg-config --libs opencv` (for open CV in this case; note the backtics)
Otherwise, you will need to add them to the linker settings:
Project --> Properties --> C/C++ Build --> Settings --> Tool Settins tab --> linker --> Libraries
bottom pane is for paths which will be added as -L<path> (omit the -L)
top pane is for actual libraries to link as -l<lib> (omit the -l)
[Updated on: Wed, 20 December 2017 02:02] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03476 seconds