GMT 5 API simple question
Mikhail Tchernychev <[email protected]>
| Newsgroups | gmane.comp.gis.gmt.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am just trying to compile very simple example with GMT 5.0 API
using VS 2010 Express. Here is the code:
// sample1.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
#include <stdlib.h>
#include "gmt.h"
int print_func(FILE * dat, const char * msg) {
fprintf(stderr,"Message: %s\n", msg);
return 1;
}
int main(int argc, char ** )
{
fprintf(stderr,"Point 1\n");
void *API = GMT_Create_Session ("Session name", 2, 0, print_func);
if(API) {
fprintf(stderr,"Created GMT API!\n");
}
return 0;
}
Everything compiles and runs just fine after I added GMT dlls in the PATH.
But functions GMT_Create_Session just does hard exit no matter what
(Point "Created GMT API!" never reached).
Am I missing something simple? Is there any examples if API based code?
I am using binary file "gmt-5.1.0-win32.exe
<http://gmt.soest.hawaii.edu/files/download?name=gmt-5.1.0-win32.exe>"
That you!
Mikhail
<html>
<body>
<FONT face= "Arial" size= "-1">
PLEASE NOTE: This message, including any attachments, may
include privileged, confidential and/or inside information. Any
dissemination, distribution or copy of this communication by
anyone other than the intended recipient is strictly
prohibited. If you are not the intended recipient, please
notify the sender by replying to this message and then delete
it from your system. Information provided via electronic media
is not guaranteed against defects including translation and
transmission errors. The company accepts no liability for any
damage caused by any virus transmitted by this email.
Geometrics Inc.
2190 Fortune Drive
San Jose, CA 95131 USA
</FONT>
</body>
</html>
To unsubscribe, send the message "signoff gmt-help" to [email protected]