KDevelop 4.3.1 not parsing Eigen 3 - parsing

I'm using KDevelop 4.3.1 on ubuntu 12.04. It's not parsing the Eigen 3 library, while this release note says it should.
It is a little more subtle than this.
KDevelop is parsing part of the Eigen library when placing a using namespace Eigen before the code. However, it will not parse into the the classes (e.g. Identity in Matrix2d::Identity() will not be parsed).
When using nested namespaces, it will parse the namespace, but nothing more (e.g. Matrix2d in Eigen::Matrix2d will not be parsed), except for something called internal (i.e. Eigen::internal).
I've only found this post which resembled my problem, although here the issue is resolved after a KDevelop crash. Does anyone have a more reliable sollution? Is there anyone with the same issue, at all?
Kind regards
PS: Building the code works fine.

Related

F# build error: "No compiled representation for provided namespace"

Has anyone run into this error message before? Google found it for me in the source code (https://github.com/fsharp/fsharp/blob/master/src/fsharp/tast.fs), but I haven't the slightest idea what is causing it.
This started happening when I tried to upgrade my library project from .NET 5 to .NET 6, so the real answer to my question may be an explanation of what I did wrong there. All I did was the following:
In the fsproj, changed "TargetFramework" from "net5.0" to "net6.0"
In my paket.dependencies file, changed "framework" from "net5.0" to "net6.0". (I've also tried commenting out the "framework" line.)
Then after running "paket update" and "dotnet build" I get the obscure error. ("error FS0192 : internal error : No compiled representation for provided namespace")
UPDATE: After some laborious code commenting/uncommenting, etc., I believe I've narrowed this down to my code's use of the Fable.RegexProvider assembly. (I use the SafeRegex component.) RegexProvider hasn't been updated in a couple years. I'll alert the folks over there to this issue, and I'll post an update here if/when I learn anything. (In case anybody else runs into this.)
In case anyone else runs into this, here is the solution (which is the solution #CaringDev recommended above, though it only works for Fable 3.7.18 and after):
When I raised this issue on the Fable.RegexProvider github (see thread here: https://github.com/fable-compiler/Fable.RegexProvider/issues/9), the initial thought was to try a .NET 6 build of Fable.RegexProvider. But then Alfonso Garcia-Caro realized that subsequent improvements to Fable may have obviated the need for SafeRegex.
He ultimately needed to tweak something in Fable, but as of version 3.7.18, the Fable transpiler supports the use of FSharp.Text.RegexProvider, such that Fable.RegexProvider is now unnecessary.

How to compile a demo from "Introduction to 3D Game Programming with DirectX 11" in Visual Studio 2015 (or later version)?

I've been stuck with this for a few weeks and I just kept getting strange debug errors like:
1.a combination of 3 errors about DXGI_RGBA in dxgi1_2.h(now has temporary disappeared)
C4430,C2143 and C2061
like errors in this link
Errors about dxgi1_2
2.error C2677: binary '': no global operator found which takes type 'DirectX::XMVECTOR' (or there is not acceptable converstion)
This version of overload for operator is declared in DirectXMath.h, defined in DirectXMathVector.inl and works perfectly fine in other parts of this demo project.
3.Sometimes lots of errors just pop up when I open a file but they won't be considered as errors when building.
I wonder if there is something to do with the include order I take.
Is it possible to give me a clear guide for how to deploy demos from this book in vs2015? I would truely appreciate that. Thanks!
I solved this problem by including DirectXMath.h and adding
using namespace DirectX;
in the CPP file where I got that error.
All of the operators were moved into the DirectX namespace in the latest SDK

Lexical or Preprocessor issue / xmlversion.h not found when using Sudzc/VTK in an iOS app

I've set up VES and am modifying the Kiwiviewer app in XCode 4.3.2. Kiwi builds and runs fine, so I'm now trying to set up Sudzc within my app (it works fine standalone). I've followed the tutorial here but at the point after modifying the headers, where his app builds and runs, mine instead comes up with a succession of errors. At first, it gives >150 errors all along the lines of:
Lexical or Preprocessor Issue
Invalid token at start of a preprocessor expression
Mostly pointing at the line
#include "xmlversion.h"
in a file tree.h, which is a part of vtkmodular/Utilities/vtklibxml2/include/libxml/tree.h.
Changing the " " to < > (which was suggested for a similar problem) instead gives another Lexical or Preprocessor Issue, this time that 'xmlversion.h' file not found - seemingly all in the file tree.h. The file's in my Project Navigator (and cmd-clicking on #include "xmlversion.h" does indeed load the file, so it understands it that way).
Presumably then the problem is with vtk having its own version of libxml2? If this is the case - what can I do about this? All of the errors I've looked at seem to originate from within soap handler classes, and eventually get through to "include < libxml/tree.h>" - which is then in the vtk directory shown above. I'm not really sure where to go from here - is it wrong to include the library that's added in the instructions? Can/should I modify the header paths? If this isn't the tree.h the rest of the code is looking for, where is it - a quick system search didn't find it?
Or am I completely off the mark?
Thanks in advance!
I got an answer from the VES Mailing List, link here. It ended up being as simple as removing the VTK version of libxml2, which it seems VES doesn't use. Hope this might be of use to someone!

Unable to open a cgns file

Okey, this is not a core programming question; it is more of a question regarding cgns (CFD general notational system) API.
I've exported a grid/mesh file from ANSYS Fluent (which was first created in Gambit 2.46), and I wrote a very simple Fortran program to open and close it (doing nothing else). To check the file is not corrupt I plotted it in Tecplot.
So, when I compiled using gfortran with the mentioned cgns and ran the program I got this error (as part of cg_error_exit_f())
ADF_Database_Open:File does not exist or is not a HDF5 file
Here is the program
program cavity
include "/usr/include/cgnslib_f.h"
call cg_open_f("Cavity.cgns",CG_MODE_READ,index_file,ier)
!check for error if so exit
if (ier .ne. CG_OK) then
call cg_error_exit_f()
end if
write(*,*)"I kind of opened the file?"
call cg_close_f(index_file,ier)
stop
end program cavity
I'm able to write both structured and unstructured grids in cgns format, without any problem.
I suspect the cgns library I'm using(version 2.5.5 packaged in Fedora 15 and Scientific linux 6.1) is built to support only HDF5, while the exported grid file is written in ADF format.
Any ideas to circumvent this or perhaps adding ADF? Which by the way is not packaged in both the distributions. Any other grid generator which is compatible with cgns version 2.5.5?
I hope I was clear. Any further info required, I would provide.
There is so much that could've gone wrong in here, and I'm afraid you didn't exactly narrow the problem down.
You said you exported a file from Fluent (what kind of a file is it? Be sure!). cg_error_exit_f() gave you an error listed. I'm assuming you have the source of the mentioned routines? In the program you include a cgnslib_f.h file - what's in it? I'm assumming the program compiled without errors of any kind, making this a file format question, not a fortran question.
Again, verify what kind of file Fluent produced.
When I ran into this situation, I discovered the following tools:
hdf2adf
adf2hdf
They are in the cgns-convert package on Ubuntu and are probably available for your distribution as well.

AIX dynamic linking

I'm working on porting a library onto AIX. It works on Solaris, Windows and Linux but AIX is giving me headaches. I'm at a point where it builds and runs but I have an issue with some of the libraries it's linking in. Ideally I want to be able to ship a library that just requires the c runtime to be available with no other dependencies. At the moment I'm having a problem with libpthread which I can see is a symlink to an AIX specific threading library.
My issue is this:
If I don't link pthread (I don't seem to need to on Solaris for the same code base) then I get undefined symbols. That's fine I am using pthreads. If I link it in then it works fine, except that any calling application also has to link to pthreads. I don't really understand is why does my calling app, which has no dependency on pthread, need to link against it just because it's calling a library which links to the shared object?
I'm on AIX 6.1 using gcc 4.2.4.
I'd be OK with shipping a library that requires pthreads to be present on the library path (ideally we'd get a static version) but I'm a bit unhappy about shipping a library that places linker rqeuirements on the client.
Any ideas on what I might be doing wrong?
I defeinitely seem to be going in circles. I removed the -shared flag on the linker to resolve an earlier problem and that, of course, makes the library static. So the behaviour is just normal behaviour in that if you depend on a dynamic library from a static one you have to link both into your app. So I've put the shared flag back and now half of my functions are no longer accessible. It does explain the problem I was seeing though.

Resources