Author Topic: help with code complete, MSVS and a minor bug I've found  (Read 8694 times)

neil

  • Guest
help with code complete, MSVS and a minor bug I've found
« on: February 24, 2006, 11:55:32 am »
Hello,
I'm using Code::Blocks for the first time and have a few problems, if anyone can help, I've also noticed a bug/feature:

1. How do I get the autocomplete/intellisense/class method list to be made available? I've compiled ok in mingw but still no context help is available

2. I'm also using VS2003 professional (full version not the toolkit) but when I try to compile I get an error from cl.exe saying, 'failed to starte because mspdb71.dll' was not found. I haven't installed the profiling library but in the compiler settings I have not enabled the profiling build option.

I've also discovered a minor problem. I develop using dual screens. Code::Blocks correctly displays itself in my second screen, but when it displays dialog boxes it shows them in the other window, which is really annoying. One thing I did notice though, in some windows, e.g. project options, even though the dialog displays in the other window, when I click on the 'project build options...' within the dialog box the dialog box this opens, goes to the correct window.

thanks.

Neil.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: help with code complete, MSVS and a minor bug I've found
« Reply #1 on: February 24, 2006, 12:01:44 pm »
I've also discovered a minor problem. I develop using dual screens. Code::Blocks correctly displays itself in my second screen, but when it displays dialog boxes it shows them in the other window, which is really annoying. One thing I did notice though, in some windows, e.g. project options, even though the dialog displays in the other window, when I click on the 'project build options...' within the dialog box the dialog box this opens, goes to the correct window.

Check if Settings-->Environment-->View-->Enhanced multi-monitor dialog placement can solve your problem :).

Best wishes,
Michael

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: help with code complete, MSVS and a minor bug I've found
« Reply #2 on: February 24, 2006, 12:04:39 pm »
1. How do I get the autocomplete/intellisense/class method list to be made available? I've compiled ok in mingw but still no context help is available

Code completion is WIP. And a new one is in "development". Search in the forum for useful info.

Best wishes,
Michael

neil

  • Guest
Re: help with code complete, MSVS and a minor bug I've found
« Reply #3 on: February 24, 2006, 01:39:25 pm »
Thanks, erm
Quote
Check if Settings-->Environment-->View-->Enhanced multi-monitor dialog placement can solve your problem
I don't have this option
Quote
Code completion is WIP. And a new one is in "development".
I'm running the stable 1.0rc2, will getting the beta4 have these two options? I'm moving over because I'm sick of Dev-C++ crashing all the time and want to build MSVC and MinGW without running two IDE's, are the betas fairly stable?

I've also got another problem, when I load my project up I get the following error:
10:45:31: The path 'E:axl.h' contains too many ".."!

All I have in my code is:
Code
#include "../../../axl_framework.h"
What's so wrong about that?

Thanks for all the help.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Be patient!
This bug will be fixed soon...

neil

  • Guest
Re: help with code complete, MSVS and a minor bug I've found
« Reply #5 on: February 24, 2006, 03:21:46 pm »
Thanks, this new version is much, much nicer :)

However, I still don't get any help when typing 'object->' and I still get the same error with VS2003.

I don't know if I'm doing something wrong or whether it is meant to be like this, but when I switch compilers (between GCC and MSVC), it gets some of it's compiler/linker flags mixed up. For example, after minGW compiled ok, I switched to MSVC, enabled /MD flag, then when I switched back to minGW and tried to compile it failed saying '/MD no such file'. Even after removing the flag from MSVC, minGW gives me the same error and I can't compile minGW now.

While I'm here, I guess you could call this a feature request (unless it' been done), but when you switch compilers, it would be nice to get a completely new set of values in the build options, e.g. in minGW I reference a few .a files but when I switch to MSVC these are still there, similarly for MSVC, minGW settings shows a few .lib files.

Thanks.


Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: help with code complete, MSVS and a minor bug I've found
« Reply #6 on: February 24, 2006, 03:27:09 pm »
Thanks, this new version is much, much nicer :)

However, I still don't get any help when typing 'object->' and I still get the same error with VS2003.

I don't know if I'm doing something wrong or whether it is meant to be like this, but when I switch compilers (between GCC and MSVC), it gets some of it's compiler/linker flags mixed up. For example, after minGW compiled ok, I switched to MSVC, enabled /MD flag, then when I switched back to minGW and tried to compile it failed saying '/MD no such file'. Even after removing the flag from MSVC, minGW gives me the same error and I can't compile minGW now.

While I'm here, I guess you could call this a feature request (unless it' been done), but when you switch compilers, it would be nice to get a completely new set of values in the build options, e.g. in minGW I reference a few .a files but when I switch to MSVC these are still there, similarly for MSVC, minGW settings shows a few .lib files.

Thanks.



Those compiler switches should not interfere with each other, so if that's the case, you have discovered a bug.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: help with code complete, MSVS and a minor bug I've found
« Reply #7 on: February 24, 2006, 03:35:51 pm »
Quote
Those compiler switches should not interfere with each other, so if that's the case, you have discovered a bug.

They don't interfere. If you change the compiler of a target, then any compiler specific options don't get converted for the new compiler.
This is not a bug. It is known limitation which will be fixed with the next compiler framework.

And before neil asks when will that be, it 'll be When It's Ready(tm).
Be patient!
This bug will be fixed soon...

neil

  • Guest
Re: help with code complete, MSVS and a minor bug I've found
« Reply #8 on: February 24, 2006, 04:11:11 pm »
Cheers, is there anyway I can get rid of this hidden '/MD' flag stopping mingw from compiling, other than creating a new project? As I mentioned, removing it from MSVC doesn't work. So they must interfere, otherwise MinGW wouldn't have picked it up. I guess it's an easy enough bug for anyone to recreate.

any thoughts on why MSVC compiler is trying to use the profiled dll?

Keep up the good work, it's appreciated :)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: help with code complete, MSVS and a minor bug I've found
« Reply #9 on: February 24, 2006, 04:36:16 pm »
Quote
Those compiler switches should not interfere with each other, so if that's the case, you have discovered a bug.
They don't interfere.
mandrav: I'm afraid neil is right - I can reproduce this issue. I've created a simple C++ console project, compiled with GCC, it's fine. Then in the "Build options" I changed the compiler to "MSVCToolkit" and enabled the /MD switch. C::B complained: "You have changed the compiler used for the project. Do you want to use the same compiler for all the project's build targets too?" and I said "Yes". I couldnt' compile (rebuild), but anyway. Then I switched back to GCC and tried to compile (rebuild) again. And look at the log:
Code
-------------- Build: default in Huhu ---------------
mingw32-g++.exe /MD  -IE:\Devel\CodeBlocks\include  -c main.cpp -o .objs\main.o
mingw32-g++.exe: /MD: No such file or directory
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

takeshimiya

  • Guest
Re: help with code complete, MSVS and a minor bug I've found
« Reply #10 on: February 24, 2006, 05:44:35 pm »
any thoughts on why MSVC compiler is trying to use the profiled dll?

Yes, the MSVC compiler (not the free version) needs to add some additional paths.

Go to Settings->Compiler and debugger settings->Choose MSVC->Global compiler settings->Tab Programs->Tab Additional Paths.

On MSVC2005 (probably 2003 too), you need to add  %YOURMSVCDIR%\Common7\IDE and %YOURMSVCDIR%\Common7\Tools.

Note: Yesterday I tried to improve the AutoDetection for it, but get stuck on other problems (mainly, versions of compilers related).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: help with code complete, MSVS and a minor bug I've found
« Reply #11 on: February 24, 2006, 05:53:01 pm »
Quote
Those compiler switches should not interfere with each other, so if that's the case, you have discovered a bug.
They don't interfere.
mandrav: I'm afraid neil is right

I didn't say otherwise.
But I said it's not a bug but rather a known limitation. Let me state it clearer:

"Compiler options are not automatically converted when switching between compilers. This is a known limitation."
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: help with code complete, MSVS and a minor bug I've found
« Reply #12 on: February 24, 2006, 06:07:16 pm »
"Compiler options are not automatically converted when switching between compilers. This is a known limitation."
Alright, got it. Sorry for the misunderstanding. :oops:
Morten.

Edit: On second thoughts: Simply making 2 targets - one for GCC and one for MSVCToolkit avoids this and makes more sense anyway if a project shall compile with both compilers... So it's maybe not even a limitation but a question of design/setup...
« Last Edit: February 24, 2006, 06:55:31 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

neil

  • Guest
Re: help with code complete, MSVS and a minor bug I've found
« Reply #13 on: February 25, 2006, 01:39:28 am »
thanks all, why didn't I discover CodeBlocks earlier :)

Quote
But I said it's not a bug but rather a known limitation.
Well, if changing a setting in one compiler (/MD for MSVC) makes it impossible to compile for another (mingw) even if you subsequently turn off the flag (/MD for MSVC) then I would call that a bug.

All that's left now is to get the context dropdown to work and I'll be as happy as Larry ;)