<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear Myeong,</div><div><br></div><div>Here is one C++ example (I'm not saying I'm necessarily coding right) that I'm having issues with.  Setting X3DNode to a virtual base class of the subclasses created other issues, but your careful eyes on this would be great.</div><div><br></div><div>bubbles.cpp</div><div>bubbles.cpp(73): error C2385: ambiguous access of 'setDEF'</div><div>bubbles.cpp(73): note: could be the 'setDEF' in base 'X3DNode'</div><div>bubbles.cpp(73): note: or could be the 'setDEF' in base 'X3DNode'</div><div><br></div><div><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/cplusplus/net/coderextreme/data/Bubbles.cpp">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/cplusplus/net/coderextreme/data/Bubbles.cpp</a><br></div><div><br></div><div>Here's the excerpted code that's failing:</div><div><br></div><div><div>TimeSensor* TimeSensor14 = new TimeSensor();</div><div>TimeSensor14->setDEF(CString("BubbleClock"));</div><div>TimeSensor14->setCycleInterval(6);</div><div>TimeSensor14->setLoop(True);</div></div><div><br></div><div>I've tried without the CString.</div><div><br></div><div>I probably could use an update to cl.exe.  Please try on your system!  If you have a set of includes available that you like to use, and work for this case, please let me know the locations on sourceforge, there are many to choose from!  I am cherry picking the .h files in: <a href="http://www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample">www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample</a> on the x3d project on sourceforge.</div><div><br></div><div>Sincerely,</div><div><br></div><div>John</div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 17, 2024 at 12:38 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear Myeong,</div><div dir="ltr"><br></div><div dir="ltr">I've gotten 1/3 of my C++ examples compiling, not without some difficulties.<br><div><br></div><div>Here are changes I've made to support some version of the .h files:</div><div><br></div><div>// replace addChildren with addChild</div><div><br></div><div><div>                               if (method.indexOf("addChildren") >= 0) {</div><div>                                        method = method.replace("Children", "Child");</div><div>                                }</div><div>// replace ImageTexture methods (I don't know if I have the current .h files)</div><div><br></div><div>                                if (element.nodeName !== "TextureBackground") {</div><div>                                        method = method.replace("setTopTexture", "setTop");</div><div>                                        method = method.replace("setBottomTexture", "setBottom");</div><div>                                        method = method.replace("setFrontTexture", "setFront");</div><div>                                        method = method.replace("setBackTexture", "setBack");</div><div>                                        method = method.replace("setLeftTexture", "setLeft");</div><div>                                        method = method.replace("setRightTexture", "setRight");</div><div>                                }</div><div><br></div><div>// addParts is desirable, if you can make the change.  Or I can change addParts to addChild</div><div>                                method = method.replace("addParts", "setParts");  // TODO, need addParts, or collect in array</div><div><br></div><div>// The methods were not available, or there was some type conflict, so use addChild.</div><div>                                method = method.replace("addFieldValue", "addChild");</div><div>                                method = method.replace("addField", "addChild");</div><div>                                method = method.replace("addJoints", "addChild");</div><div>                                method = method.replace("addDisplacers", "addChild");</div><div>                                method = method.replace("addConnect", "addChild");</div><div>                                method = method.replace("addComponent", "addChild");</div><div>                                method = method.replace("addShaders", "addChild");</div><div>                                method = method.replace("setShape", "addChild");</div><div>                                method = method.replace("setProtoInterface", "addChild");</div><div>                                method = method.replace("setProtoBody", "addChild");</div><div>                                method = method.replace("setIS", "addChild");</div><div>                                method = method.replace("setAppearance", "addChild");</div><div>                                method = method.replace("setMaterial", "addChild");</div><div>                                method = method.replace("setCoord", "addChild");</div><div>                                method = method.replace("setColor", "addChild");</div><div>                                method = method.replace("setProxy", "addChild");</div><div>                                method = method.replace("setTexCoord", "addChild");</div><div>                                method = method.replace("setTextureTransform", "addChild");</div><div>                                if (method.endsWith("setTexture")) {</div><div>                                        method = method.replace("setTexture", "addChild");</div><div>                                }</div></div><div><br></div><div>Here are the includes I am currently using:</div><div><br></div><div><div>#include "C:/x3d-code/<a href="http://www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/SphereExample/pch.h" target="_blank">www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/SphereExample/pch.h</a>"</div><div>#include "C:/x3d-code/<a href="http://www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/SphereExample/framework.h" target="_blank">www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/SphereExample/framework.h</a>"</div><div>#include "C:/x3d-code/<a href="http://www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/XML_PARSER.h" target="_blank">www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/XML_PARSER.h</a>"</div><div>#include "C:/x3d-code/<a href="http://www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/X3DLib.h" target="_blank">www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/X3DLib.h</a>"</div><div>#include "C:/x3d-code/<a href="http://www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/glMath.h" target="_blank">www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/glMath.h</a>"</div><div>#include "C:/x3d-code/<a href="http://www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/glut.h" target="_blank">www.web3d.org/x3d/languages/cpp/Examples_X3DForWebAuthors/Chapter02/SphereExample/include/glut.h</a>"<br></div></div><div><br></div><div>If you have a better set, let me know.</div><div><br></div><div>Here are my current set of .cpp files: <a href="https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/cplusplus/net/coderextreme/data" target="_blank">https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/cplusplus/net/coderextreme/data</a> (some may be out of date).</div><div><br></div><div>Here are the ones that compile:</div><div><br></div><div><div>abox.obj</div><div>app.obj</div><div>ArchHalf.obj</div><div>ArchPrototype.obj</div><div>ArtDecoPrototypes.obj</div><div>asmallbox.obj</div><div>asphere.obj</div><div>asteroids.obj</div><div>BoxEm.obj</div><div>BoxEm2.obj</div><div>Bushes.obj</div><div>CameraShape.obj</div><div>Cane.obj</div><div>CoordinateAxes.obj</div><div>DesignPatternsApparelMedicalSkinLayers.obj</div><div>ExtrusionHeart.obj</div><div>freewrlflowers.obj</div><div>glflowers.obj</div><div>HelloWorld.obj</div><div>HelloWorldCommented.obj</div><div>HelloWorldMinimal.obj</div><div>IcosahedronSubdivisionLevel5.obj</div><div>IFS.obj</div><div>indexedfaceset_pixeltexture_entire.obj</div><div>indexedfaceset_pixeltexture_part.obj</div><div>indexedfaceset_pixeltexture_plus.obj</div><div>indexedfaceset_pixeltexture_whole.obj</div><div>JointCoordinateAxes.obj</div><div>jumpcut_loadurl.obj</div><div>KoreanCharacter01Jin.obj</div><div>KoreanCharacter02Chul.obj</div><div>KoreanCharacter03Hyun.obj</div><div>KoreanCharacter04Young.obj</div><div>KoreanCharacter05Ju.obj</div><div>KoreanCharacter06Ga.obj</div><div>KoreanCharacter07No.obj</div><div>KoreanCharacter08Da.obj</div><div>KoreanCharacter09Ru.obj</div><div>KoreanCharacter10Mi.obj</div><div>KoreanCharacter11Min.obj</div><div>KoreanCharacter12Sun.obj</div><div>MainStage.obj</div><div>Marine.obj</div><div>MaskAndSnorkel.obj</div><div>Pathway.obj</div><div>plainflowers.obj</div><div>qq3.obj</div><div>rgb_alpha.obj</div><div>rubik.obj</div><div>rubikFurnace.obj</div><div>rubikOnFire.obj</div><div>ScubaTank.obj</div><div>StringArrayEncodingExamples.obj</div><div>TextExamples.obj</div><div>ThreeDTexture.obj</div><div>ViewFrustumExample.obj</div><div>ViewFrustumPrototype.obj</div><div>x3domflowers.obj</div></div><div><br></div><div>Many of the remaining problems involve ambiguity in the base class (diamond class problem?) which I have forgotten how to fix, but I will look it up.</div><div><br></div><div>John</div></div></div></div></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>