<!DOCTYPE html><html><head><title></title><style type="text/css">#qt p.qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt;font-size:12pt;font-family:"Times New Roman", serif;}
#qt a:link{color:blue;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}
#qt a:visited{color:purple;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}
#qt p{margin-right:0cm;margin-left:0cm;font-size:12pt;font-family:"Times New Roman", serif;}
#qt pre{margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt;font-size:10pt;font-family:"Courier New";}
#qt p.qt-qt-msonormal1{margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt;font-size:11pt;font-family:"Calibri", sans-serif;}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div style="font-family:Arial;">Hi,<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">I think some existing drivers already contain some C files, AIGRID for example. Others have a sdk subdirectory with library code in there. I don't think including your code as C will be a problem.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">On the other hand, offering a C API for new drivers might be an interesting idea. Using C++ makes writing drivers in other languages a bit more complicated. But I know this wouldn't be trivial, since GDAL uses inheritance.<br></div><div style="font-family:Arial;"><br></div><div style="font-family:Arial;">Laurentiu<br></div><div style="font-family:Arial;"><br></div><div>On Thu, Jul 6, 2023, at 16:01, Abel Pau wrote:<br></div><blockquote type="cite" id="qt" style=""><div class="qt-WordSection1"><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">Hi again.</span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">I finally did that and I am happy.</span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">It would be helpful for us to be able to use our C functions to read and write some parts of our format instead of passing
all of them to C++.</span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">I’d like doing that but it’s not possible for the moment convert all our code to C++.</span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">My proposal is use a ogrmiramondatasource.cpp, a ogrmiramondriver.cpp and a ogrmiramonlayer.cpp as all of the projects
that are created and add our files from C as necessary.</span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">The main goal is adding only the necessary ones.</span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">The question: Is this possible? Can I simply add C files and use that functions from C++ files? Or do GDAL prefer doing
it in another way?</span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">Sorry if it is written somewhere else but I couldn’t find it.</span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;"> </span></span></span><br></p><p class="qt-MsoNormal"><span style="color:rgb(31, 73, 125);" lang="EN-US"><span class="font" style="font-family:"Calibri", sans-serif;"><span class="size" style="font-size:11pt;">Thanks again for your kind help.</span></span></span><br></p></div></blockquote><div style="font-family:Arial;"><br></div></body></html>