I have programmed an application in C++Builder 6, compiled in Windows 95, the application works perfectly.
The error appears when I compile the application on Windows 10. The following error occurs in the header file _bitset.h:
In
template <size_t _Nw>
On the line
_WordT _M_w[_Nw];
array must have at leas one element
Any ideas?
Thank you all for answering...
I finally solved the problem...
Although the version of the class that I had installed on the new pc seemed the same as on the old pc the "boost_1_31_0" the _biset.h files were different, it was enough to replace the ones on the new pc with the old ones and EUREKA.
Thank you all for your time and excuse my English.
Without MCVE source code or BCB6 installed on Win10 we can only guess sohere are few hints instead of direct answer...
First OS related hints:
There where quite a few changes in OS since BCB6 times. The most likely reason for problems are wrong absolute paths on 64bit windows simply copy compiler and IDE stuff from:
[Program Files (x86)]
into:
[Program Files]
that usually works for most of the older IDEs and SW build before 64bit Windows (like GC/GCC + Eclipse).
On top of this Win10 changed process scheduling to the point many older SW does not work properly or at all and even compatibility modes are useless in Win10. My experience with direct successor of BCB6 (BDS2006 Turbo C++ Explorer) is that to run properly you have to:
run IDE as administrator
You can set this in BCB6 icon properties (compatibility).
set IDE process affinity to single CPU
You can set this in Task manager on BCB6 process. Without this the IDE will freeze for few seconds (up to 45sec) every few minutes (or seconds).
Beware if your app is multithreaded You have to set its affinity back to all CPUs somewhere in your App init code. This is done like this:
Cache size estimation on your system?
Just look for SetProcessAffinityMask usage in the last code there.
install font fix for user folder
I do not know if BCB6 needs this but BDS2006 will not work properly without it as after some Win7 update MS changed the policy of user folder and having fonts there is no longer allowed without fix.
If nothing works try to use Win7 there usually works everything on first try without any problems. Old developing tools tend to not work at all or properly on Win10 and newer versions are usually much worse than old some to the point of to be unusable especially for MCU and USB stuff. So its always a good idea to have a backup Win7 PC for development.
Now code related hints:
Different OS mean different compiler #define directives which means some parts of code might be different then on Win95 see:
C++Builder Compiler Version
so some (most likely inbuild) header files you use might be wanting to see some OS version and have numbers that are not handled in code properly causing some parts of code are not compiled. The remedy is simply to look for those #define in code and either change the version numbers or add new entries ...
Also it looks like BDS2006 compiler bug fix can remedy some weird bugs on BCB6 too so see:
bds 2006 C hidden memory manager conflicts (class new / delete[] vs. AnsiString)
Too many initializers error for a simple array in bcc32
I installed Visual Studio Code 1.1 with the C/C++ extension,
opened my C++ project and tried to use "Go to definition" in vain.
The "Go to definition" is not working at all.
Example, go to definition of a class member:
int i = m_myVar;
(I opened a simpler project with one file and it was working for this one)
In the end, what I want is good indexation of my big project, is there a way to install Intellisense?
I had a the same issue: F12 and Ctrl + Click and Right Click "Go To Definition" wasn't working.
The fix for me was:
Go to Extensions
Click "Disable All Installed Extensions"
Close and Reopen VS Code
Back to Extensions and "Enable All Extensions"
Essentially enable/disable all extensions fixed the issue.
I recently came across this same issue and after trying all of the suggested solutions I could find with no success, I found this article:
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
Basically my project grew too large and VS code was no longer able to track all files, which messed up the "go to definition" functionality.
After following the steps on the link to increase the maximum number of files to be tracked, the issue was resolved.
The correction is pretty simple (tested on Ubuntu 18.04):
Add this line:
fs.inotify.max_user_watches=524288
to the end of the file /etc/sysctl.conf
After saving, run the following command:
sudo sysctl -p
Hopefully this will be useful to someone else, this has been bothering me for the last few days.
I had a similar problem except with Python and google searches for solutions kept bringing me back to this post so I figured I'd post my solution here in the hopes that it might help other people.
I was working on a remote cluster through VScode Remote and was getting similar errors to the original question(all 'go to ___' functionality was unavailable and was even getting a 'too large to track' error) and I thought I had to increase the number of watches, which didn't end up helping.
All I needed to do was install a python interpreter on the remote VScode server. This fixed my problem.
I believe vscode 1.1 (well, 1.1.1 actually) + the C++ extension (cpptools) is as much Intellisense as we can get for now.
You should load your big project with the "open folder" function to make vscode know about the other files.
https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/ warns about letting the indexing finish first (red icon in lower right corner during indexing) and mentions the current limitations on the source code parsing.
It wasn't working on my laptop as well after installing a few VSCode extensions. I decided to close and re-open VSCode with administrator permission and suddenly it sorted out.
I have been trying to fix this for a long time. In the end, what worked for me was simply reinstalling VSCode, then installing the latest C/C++ extension (v0.18.1). Then, in your .vscode/c_cpp_properties.json file, under includePath, add your include folder which has all your header files.
I tried the methods mentioned in this thread none of them seemed to work for me. A simple solution that worked for me is that I closed the current workspace and created a new workspace, added the folders which I required(same as the old workspace), and saved the new workspace. Waited for a couple of minutes to index and IntelliSense is able to find definitions now.
I am using VSCode 1.52.1 on Ubuntu 20.04.
In my case, for whatever reason,c_cpp_properties.json has become set to Disabled in ~/.config/Code/User/settings.json.
Manually changing it to Enabled solved the problem.
Fixed mine by UNCHECKING C_Cpp > Default > Limit Symbols To Included Headers
Your mileage may vary. Good luck!
Have you saved your workspace? Or did you just open a folder with File->Open Folder? This question already has many answers, but none of them address this case, which was my issue.
The question is not specific enough for me to know if you are having the exact same symptoms as my case.
If:
You have not saved your workspace. vscode doesn't say "(workspace)" at the top of the window.
None of the goto functions are working, but instead report: "No ___ found for ____"
The tag parser database icon in the bottom right is always there but only reports "Parsing open files", rather than telling you how many files have been parsed.
Then:
Try saving your workspace.
If you have multiple versions of a language on your PC, specify the exact language you are using in the VScode(in my case, I am using Python, so I must specify the version to the python Interpreter in VS Code)
If you could not do it whatsoever, then uninstall all the other versions that you don't use and then if you go to VS Code, it will ask the version to be used, and you would have only one version, so when you select the version, the "Go To Definition" will be activated.
I was having a similar issue with java on Ubuntu 20.04 using OpenJDK version 11 (openjdk-11-jdk in apt). At first I didn't have the JRE installed, so I installed it and it still didn't work.
Afterwards, I went to the CTRL + SHIFT + P menu and then to Java: Configure Java Runtime, there I saw in the Java Tooling Runtime tab that /usr/lib/jvm/java-11-openjdk-amd64 was selected, changed it to /usr/lib/jvm/java-1.11.0-openjdk-amd64 just to see if it would work, and after a restart it did. I'm not sure why this is, but I hope it may help somone else.
For python ensure your code analysis settings are correct. In my case the languageServer was accidentally set to 'None'. Reverting it to 'default' or 'pylance' did the trick.
Just to inform if none of above works then
In my case i was using Kite extension in my VS code, I just disabled it and it worked. I think kite extension is blocking this feature.
OS: Linux Ubuntu 22.04
if you encountered with following error:
"The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path."
Normally Vscode remains unable to locate .Net sdk. need to set path manually.
sudo ln -s /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet
restart omnisharp & restart vscode
No need to do anything. Just close and re-open. It will work.
I also faced similar problem. In my mac os cmnd + 'click' is used to 'go to definition' then it suddenly stoped working. If that is the case then please follow these steps:
restart vs code
restart pc
uninstall all extensions and reinstall again followed by a pc restart.
I had a similar issue with the extension C/C++ installed. I solved it by downloading an older version of the extension and upgrading to the last version. Somehow it solved the problem...
Few days ago I had to reinstall all my Linux system, and I also had to reinstall Eclipse CDT as I used to work with it since few weeks.
Unfortunately, since then I do not have live error checking anymore... and I miss it ;)
If I create a new Hello World C++ project (New / C++ Project / Hello World C++ project) and then add some errors like calling a method from an nonexistent class or adding any undefined or untyped variable, well Eclispe doesn't underline and report them as it was doing before I had to reinstall it all.
I searched stackoverflow, and tried to deactivate/reactive "Build automatically" without any change. I also verified that the project path is included in the project sources (Project properties / C-C++ general / Path and Symbols / Source Location) but as it already was, it didn't solved the problem.
When I "Build All" the errors are well reported in the "Problems view", and then when I fix one problem and save the file, the error disappear from the Problem view, but then if I add another problem and save, nothing is reported until I build again. Even errors turned to comments still remains underlined until the next "build all".
Do you have any idea to help me reactivate this feature ?
I was under Eclipse Linux 3.5 and I now use Eclipse Linux 3.7.
I installed the Eclipse package: Eclipse C/C++ IDE Indigo SR-1 with Eclipse Platform 3.7.1 and that fixed the problem.
So I guess, there was a problem with the 3.7.0 currently provided by the Ubuntu Software Center.
With this new version all is Ok by default.
I have a fairly large fortran90 project in Photran. I find that sometimes the editor just hangs or is very slow. Saving a file or using ctrl+/ for commenting lines seems to trigger this slowness. Any solutions to this?
I do have refactoring turned on as I find it useful to navigate, turning that off seems to help some. Any other solutions?
I am using eclipse-Galileo, photran 5.0 on linux OS. I have jdk 6 as my java environment. Will updating to Helios and a later photran make a difference? Is it easy to update to Helios?
Edit: Just checked TOP, the cpu is working at 100% when I am trying to save a file! And I even have the refactoring turned off.
Here is the answer to this question from the photran mailing list...
http://dev.eclipse.org/mhonarc/lists/photran/msg01691.html
See the rest of the thread for more information.
The only solution for now seems to be to turn off refactoring.
I was able to reproduce the issues with Photran refactoring on and off when using the same workspace with different Eclipse versions. I think you have to remove your ~/.eclipse and ~/workspace/.metadata directories and have a fresh start. I have been using the latest Eclipse (Kepler) with Photran refactoring on/off without any issue.
I am trying to use Ganymede CDT to index our large codebase. It is painfully slow, can take a whole night to index the C++ files. Same project takes only 5 seconds to index with exuberant ctags 5.7.
Is there some way to find what the root of the problem is and to speed it up?
Maybe turn on logging in CDT, or some obscure option somewhere that I missed?
If you use the "full indexer" this would not surprise me. I'm using the "fast indexer", it is very fast and works pretty well (even with wxWidgets).
You can change your indexer settings in Window->Preferences->C/C++->Indexer.
Do you know if this is a regression from 5.0.0? In that case you should definitely open a bugreport.
Is all of your code in the same project? That may have an impact.
We have a similar problem with Eclipse under Windows; in our case, it is because of an old version of cygwin.
To know if you have the same issue, just check with Process Explorer if Eclipse spawns cygpath.exe, and it does not complete in a reasonable time.
In case this is the cause of the problem, then it is enough to just put the last version of cygpath.exe and cygwin1.dll in eclipse directory, and then you are done.
Good luck!