How to get version of program in Vala? - version

I'm starting to learn Vala and after just a few lines of code, I just encountered my first problem. It should be kinda easy but somehow I can't find anything on Google ('vala version number' or 'vala get version number' or 'how to get version of program in vala' don't bring up anything useful).
The online documentation of Vala doesn't bring up anything useful, either. Throughout the web I find stuff on how to get Vala's version or GTK version or stuff like that.
edited stuff
What I want to get: The version of the program that is running. It should query itself to get it's own version number. I can set a version number for the project in the Anjuta IDE so I expect to be able to get that version information somehow. Since I can get the name of the application (via GLib.Environment) I should be able to get the version information, too.
edit end
May someone please be so kind and help me out here? It seems my GoogleFu isn't with me today.

If you use the autotools, the generated config.h header will contain your package version. The symbols can then be used from Vala via a custom config.vapi binding. You could check out sampala, it shows the trick.

Related

No source available for xx_func() at 0xyy_address

I have been trying to develop and run core-mark benchmark on the EVB. I have added bunch of different source files provided by EEMBC and a static library too. All in accordance to the guidelines provided. Compilation is fine.
However, when I try to run the actual benchmark command - mcoremark-(#iterations), I am getting a hard fault.
I am not really sure why that is happening - but when I check the thread - it says "No source available for xx_func() at yy_address"
IDE that I am using - Eclipse
Could you please help me understand what might be happening here?
If you need more details, please let me know.
Thank you.
I am not really sure where to start in terms of debugging. I did check the symbol path of the library file provided and that seems to be in order.

Couchbase C API doesn't have n1ql.h anymore?

A couple years ago I wrote a small utility program for my employer, which accessed a Couchbase cluster via the Couchbase C SDK. I've just returned to it to add some new features, installed the Couchbase C SDK on my Ubuntu 20.04 development system via the instructions found here, and tried to compile my code, and it complains that it can't find libcouchbase/n1ql.h. When I checked, sure enough, the file is nowhere to be found on my machine.
I've tried installing all of the packages provided by their repository, none of which seem to provide that file. I've also tried removing them all and installing libcouchbase from source, with no luck (the instructions seem completely out of date); searched it manually but that file isn't in there either. Even grepping for other items that I know have to be in there, like lcb_N1QLHANDLE, doesn't turn up anything.
There's obviously something I'm missing, but I can't even see the shape of it. Have they moved the N1QL code to a separate repository? Gotten rid of it entirely? Renamed it without updating the documentation?
The utility you wrote was probably built using an older version of libcouchbase than what's in the "master" branch on GitHub. If you check out the tag 2.10.7 you can see the n1ql.h header here:
https://github.com/couchbase/libcouchbase/tree/2.10.7/include/libcouchbase
Installation instructions and other documentation for version 2.10 are here:
https://docs.couchbase.com/c-sdk/2.10/start-using-sdk.html

"stack.cpp not found" prevents debug in VS 2013 express

I'm a rookie at C in general and VS 2013 also. I am trying to use some C code provided by a vendor in VS 2013 express. It compiles and runs without problem using the command line compiler but I would like to use the IDE.
I started a new project, C++ for console app, and I have pasted the code into the IDE and saved it as xyy.c so that it builds successfully. I thought it would be nice to have it in a GUI, so I duplicated the effort with a Win32 app project. It also builds.
The program's job is to connect to a PCI card that has Plx chip as an interface and program an FPGA. The Win32 program succeeds, even though I can't see any of the info printed by the program. The console program fails and I think it is because it fails to find the driver for the Plx chip. I thought I would get a clue by single stepping through the Win32 program to see which driver was supposed to be found.
However, after the first pass through a while loop, I get a pop up that says "Source Not Found" and "stack.cpp not found". Google wasn't any help to me.
I be grateful for any suggestions.
You might have "Enable .NET Framework source stepping" enabled (see http://msdn.microsoft.com/en-us/library/cc667410.aspx). So when you are at Stack... and trying to step into, it will actually try, but you don't have the sources for that. There is also a new experience for using the .NET framework reference source that was announced recently: http://blogs.msdn.com/b/dotnet/archive/2014/02/24/a-new-look-for-net-reference-source.aspx
I faced the same problem. I advise at the moment of receiving the information "stack.cpp not found" to look at the stack trace and check if there is something like this: "RTC".
If there is, you need to change the flag along the path (for example, set the Default or a more convenient configuration for you):
Project Properties -> C/C++ -> Code Generation -> Basic Runtime Checks
More details: https://learn.microsoft.com/en-us/cpp/build/reference/rtc-run-time-error-checks?view=msvc-160

Include path issues in Eclipse: probably Indexer

While I was trying to compile a linux-kernel (v. 2.6.39) in Eclipse CDT, I have a not leaving problem about my include paths. I know this is a well discussed topic in the Internet, but all these solutions didn't fix my errors.
One of the errors is: **linux/kvm_host.h: No such file or directory**
one of the marked line in the source code is: #include < linux/kvm_host.h>
What I did (and actually expect to solve this problem):
In
Project Properties
C/C++ General
Paths and Symbols
I've added in "Includes", "Library Paths" the include directories:
e.g.:
- /[path-to-kernel]/linux-2.6.39/
- /[path-to-kernel]/linux-2.6.39/include
- /[path-to-kernel]/linux-2.6.39/include/linux
Still (after another make), it hasn't changed a thing.
So what's the matter, can someone give me a hint?
[Edit: As i mentioned in the comments, with STRG+Click on a underlined library it opens in my browser, so i believe it's just a problem of the Indexer but I think i have tryed everything in its options menu]
I just try to develop a fresh Linux kernel nothing special, I can't be the first one, doing this with a fresh eclipse.
After making a new project on the same kernel for the 3rd time it's working now. But still i don't have a clue why :/, since i rebuild the project an the indexer several times. I hope this won't be going on like this.
Thanks for your support!

Monotouch LLVM compiler doesn't work

Hello all I hope I can find a solution for this,I have my project in monotouch and I have configured my AdHoc profile for test on devices, I am able to generate the apps using the standard compiler, but when I want to use the LLVM compiler this compilation process literally never ends .. I left my mac turned on all the night .. I even tried changing the linker options (I know is not recommended). In short I tried with link sdk assemblies only and with don't link. Still the process never ends. If someone is experiencing the she problems and could help me please. Thanks.
Never seen this - but that's definitively a bug and should be reported to Xamarin.
Please trying adding -v -v -v to your Additional mtouch arguments (in the project's options) so the verbosity will be at the maximum.
The rebuild and switch the the "Build Output" (it's in the Error List pad inside MonoDevelop). Once it seems stopped copy-paste the log and include it in the bug report. That should give enough information to diagnose the issue.

Resources