use extern C so that the compiler considers C bindings

This commit is contained in:
George Danchev 2011-07-05 18:52:20 +00:00
parent ac9c5ab6da
commit 0c1bcaeb94
2 changed files with 13 additions and 14 deletions

View File

@ -7,15 +7,20 @@
#include <iostream> #include <iostream>
#include <inttypes.h> #include <inttypes.h>
extern "C" {
#include "xorriso/xorriso.h" #include "xorriso/xorriso.h"
}
int main() { int main() {
int major=-1, minor=-1, micro=-1;
Xorriso__version(&major, &minor, &micro);
if (major<0 || minor<0 || micro<0)
return -1;
std::cout std::cout
<< " major:" << Xorriso_header_version_majoR << " major:" << major
<< " minor:" << Xorriso_header_version_minoR << " minor:" << minor
<< " micro:" << Xorriso_header_version_micrO << " micro:" << micro
; ;
// << std::endl;
return 0; return 0;
} }

View File

@ -7,14 +7,16 @@
#include <iostream> #include <iostream>
#include <inttypes.h> #include <inttypes.h>
extern "C" {
#include <libburn/libburn.h> #include <libburn/libburn.h>
#include <libisofs/libisofs.h> #include <libisofs/libisofs.h>
// using namespace burn; // using namespace burn;
// (this was needed to before rev.4062 of libisoburn) // (this was needed to before rev.4062 of libisoburn)
#include <libisoburn/libisoburn.h> #include <libisoburn/libisoburn.h>
}
int main() { int main() {
/*
int major=-1, minor=-1, micro=-1; int major=-1, minor=-1, micro=-1;
isoburn_version(&major, &minor, &micro); isoburn_version(&major, &minor, &micro);
if (major<0 || minor<0 || micro<0) if (major<0 || minor<0 || micro<0)
@ -24,13 +26,5 @@ int main() {
<< " minor:" << minor << " minor:" << minor
<< " micro:" << micro << " micro:" << micro
; ;
*/
std::cout
<< " major:" << isoburn_libisofs_req_major // major
<< " minor:" << isoburn_libisofs_req_minor // minor
<< " micro:" << isoburn_libisofs_req_micro // micro
;
// << std::endl;
return 0; return 0;
} }