-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying compiling GEOtop v3.0 under windows with CLion #99
Comments
This routine was removed in version 2.1 and we should do the same here
in version 3.0
Basically the code checked if the dir where it wants to run something
does exist: if not it created it..
In 2.1 things are different: if the dir does NOT exist code failed
telling you something like " not able to open/write XXXX file"
Please note that this has an important implication: if you specify a
dir where to write maps and/or table in the geotop.inpts and this does
not exist the code will fail.
This is the reason why we have the placeholder in the output_maps and
output_tabs on github; the regression tests do not run automatically
without these directories..
I am therefore very much in favour to remove this routine and to adopt
the 2.1 convention.
Maybe we can also enable a further check on the input file to see if any
directory defined in the geotop.inpts is correctly defined and/or created..
ciao
Stefano
Il 27/11/18 15:03, Giacomo Bertoldi ha scritto:
… Hi,
I´m trying to compile GEOtop v3.0 under windows with CLion.
Installed Clion, installed MinGW version 5.0, dowloaded branch v3.0
under git incorpotated with CLion ...
all incredibly smooth ....
Now first error****
|t_io.cc: L 12:|
|char parent[PATH_MAX], *p;``` Is the function ```int mkdirp(const char
*pathname, mode_t mode) { /* From
http://niallohiggins.com/2009/01/08/mkpath-mkdir-p-alike-in-c-for-unix/
*/ char parent[PATH_MAX], *p; /* make a parent directory path */
strncpy(parent, pathname, sizeof(parent)); parent[sizeof(parent) - 1] =
'\0'; for (p = parent + strlen(parent); *p != '/' && p != parent; p--);
*p = '\0'; /* try make parent directory */ if (p != parent &&
mkdirp(parent, mode) != 0) return -1; /* make this one if parent has
been made */ if (mkdir(pathname, mode) == 0) return 0; /* if it already
exists that is fine */ if (errno == EEXIST) { struct stat sb;
stat(pathname, &sb); if (!S_ISDIR(sb.st_mode)) { /* pathname is NOT a
directory! */ return -1; } return 0; } return -1; }``` Is this function
system-dependent? It seems then the system does not recognize linux
command as dir and so on? Is it possible to get rid of this or have a
windows - friendly version? |
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#99>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC3O_5NFRX_Ga5xiI6gQuO31QDbQnUmAks5uzUYdgaJpZM4Y1jbg>.
--
Stefano Cozzini ([email protected] / [email protected])
CNR/IOM uos Democritos c/o SISSA via Bonomea 265 34136 Trieste
tel 040-3787508 fax 040-3787528
|
what about to implement it that it works for Linux and Windows, removing the placeholder Problem? |
Or, if we plan to have boost as dependency, we may use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I´m trying to compile GEOtop v3.0 under windows with CLion.
Installed Clion, installed MinGW version 5.0, dowloaded branch v3.0 under git incorpotated with CLion ...
all incredibly smooth ....
Now first error****
t_io.cc: L 12:
The text was updated successfully, but these errors were encountered: