|
Re: How to use Json-c parser or any other parser in Eclipse for C programming in Windows [message #1839741 is a reply to message #1839728] |
Sat, 27 March 2021 05:36 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
You need to understand how to do this without Eclipse
then you will understand what Eclipse/CDT needs from you.
https://tldp.org/HOWTO/Program-Library-HOWTO/
https://makefiletutorial.com/
If you are looking for a detailed step-by-step procedure, it's not as simple as you might think.
A lot depends on the type of CDT project.
Generally, for any external library,
- You need to tell the compiler where the include files can be found [GCC -I (capital I) flag].
- You need to tell the linker where the libraries can be found and which to use [GCC -L and -l (small L) flags]
- Tell the Indexer where the include files can be found
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros, etc
I've assumed you are using gcc/g++.
If you are using something else you should use comparable options.
How you do the first two depends on the build system being used.
If it is a Managed Build (i.e., Eclipse creates a Makefile), set the options using
Project --> Properties --> Settings --> Tool Settings tab
For any other build methods (e.g., CMake or your own makefiles), you should refer to tutorials on using them.
The README.md file at github tells you what you need for compiling and linking
https://github.com/json-c/json-c/blob/master/README.md#linking
[Updated on: Sat, 27 March 2021 05:50] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03396 seconds