Click here to Skip to main content
15,881,666 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to use "sbas_parallel.c" code in ubuntu 18.04, i install a "gcc" compiler and insert the written row below ;

"gcc -fopenmp -w sbas_parallel.c -I/usr/local/include/gmt -I/usr/local/GMTSAR/gmtsar -I/usr/local/include -L/usr/local/GMTSAR/gmtsar -lgmtsar -llapack -L/usr/local/lib -lgmt -L/usr/local/lib -ltiff -lm -o sbas_parallel"

and this error pops up and i couldnt figure out what is wrong.

In file included from /usr/local/GMTSAR/gmtsar/gmtsar.h:5, from sbas_parallel.c:58: /usr/local/GMTSAR/gmtsar/gmt.h:56:10: fatal error: declspec.h: No such file or directory 56 | #include "declspec.h" | ^~~~~~~~~~~~

https://github.com/gmtsar/gmtsar/wiki/parallel-sbas-code

What I have tried:

"gcc -fopenmp -w sbas_parallel.c -I/usr/local/include/gmt -I/usr/local/GMTSAR/gmtsar -I/usr/local/include -L/usr/local/GMTSAR/gmtsar -lgmtsar -llapack -L/usr/local/lib -lgmt -L/usr/local/lib -ltiff -lm -o sbas_parallel"
Posted
Updated 3-Jun-22 6:01am

1 solution

You'll note that the include directive is surrounded by double quotes. This indicates that the file in question should be either in the current directory, or perhaps in a directory on the include path, (the arguments to the -I flags). Looking at the command line supplied, -I/usr/local/include/gmt is possibly suspect. Perhaps that should be -I/usr/local/include/gmtsar?

It's possible you've mis-configured the GMTSAR package. If you're sure that you've correctly configured the package, then I think you'll need to consult with the providers of GMTSAR.

NB: when using #include "file.h", the compiler will look in the local directory first, then search the paths supplied by -I then the system locations (e.g. /usr/include). When using #include <file.h>, the local directory is not searched, but the compiler still searches the -I include paths.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900