eclipse odbc Could not find symbol in index - unixodbc

When I try to click ODBC functions (like, SQLExecDirectW, SQLBindCol and so on), I get the below message. I am currently using Eclipse on Ubuntu.
Example:
Could not find symbol 'SQLExecDirectW' in index.
Can you please let me know how do I configure the eclipse to ensure that details about the function could be known.
Thanks a lor for the responses.

Figured out the solution. Though I had the library included in the eclipse project it was not properly referenced.

Related

VSCODE deletes my library line inclusion when saving automatically

I am programming C on VSCODE but I have this annoying problem. When vscode automatically saves my work, it deletes the line that has the library inclusion that I need. So when I compile it gives me an error that I did not specify the function. Someone can help me?
I don't know how to resolve.
You might have installed a corrupted version of vs code or the library files of the vs code and then location where you are saving your programs might be in different location. For example
The libary files of vs code might be in c drive and the program files might be in onedrive folder.
Try reinstalling it from an authentic source if the second stated problem is not the case. If the problem still continues then please comment down on my reply.
Reinstall either from microsoft store or from
https://code.visualstudio.com/download

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

Forcing eclipse indexer to always use specific header file when opening declaration

I've got a very huge C project that is meant to be built on Solaris. I use a Windows PC for most of my work, ssh'ing into a solaris box when I need to make edits and build the code.
I've recently imported the project into Eclipse (Luna) on my Windows machine from GitHub for ease of traversing the code. One problem I'm having is that the indexer cannot seem to determine which header file a particular declaration is coming from... I mean it's not able to tell that an enum in alarm.c can be found in alarm.h (as alarm.h is included in alarm.c), because that same enum (ERROR, for example) can be found in a couple other header files in another part of the project. See the image for what happens when I press F3 on one of the enums with multiple declarations in the project:
Is there a way to force the indexer to always use alarm.h when it has anything to do with alarm.c source code? Can I have it ignore the rest of the project? It would really aide in getting rid of the thousands of "errors" in the project which are specifically related to "multiple declarations found" by the indexer.

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!

Practicing PostgreSQL with C in Visual Studio

I would like to practice and prepare to use a server-based PostgreSQL database, for an upcoming school assignment.
The assignment will require me to write programs in C that can execute a variety of queries, as well as check their validity, etc.
I cannot find any definitive guide online to setting up PostgreSQL with Visual Studio and C.
I understand that I need to use a libpq-fe header file but when I download it from PostgreSQL and #include it, I still get linking errors and more. It's a mess.
Can someone guide me (and future users with this problem) through the process of setting this up?
You can't just download libpq-fe.h and expect to use it without anything else.
You must use libpq - include at least libpq-fe.h, link to libpq.lib and ensure that libpq.dll is present in the program runtime path. On Visual Studio that means editing your include path and library path, then adding libpq to the linker list.
I usually do a source build of PostgreSQL when I'm working with libpq, but I'm pretty sure the library and headers are included in the binary install as well. Check the install directory.
First of all you need to read this : http://pqxx.org/development/libpqxx/browser/trunk/win32/INSTALL.txt
This will tell you how to install or build libpq on your computer.
Personally, I just install PostgreSQL for Windows from the PostgreSQL official website.
This should avoid the need for building libpq.
Now that you have all the required files libpq.lib, libpq-fe.h,libpq.dll etc...You have to set the properties page of your VS project correctly i.e do exactly as specified in the INSTALL.TXT
Once the properties pages is set correctly add :
#include <string>
#include "libpq-fe.h"
#pragma comment(lib, "libpq.lib")
For further information read this tutorial : http://www.askyb.com/cpp/c-postgresql-example/

Resources