tags can't support VC's C++ std? but MinGW is OK!

General questions regarding the usage of CodeLite
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

Code: Select all

#include <string>
#include <vector>
#include <memory>

using namespace ATL;

int main()
{
	std::str	// unwork! !!~~~~***&*&*&*&    Can't show any thing!!
}
I create a tags database: include VC's all C++ stand library, egg. vector tuple string memory... (all).
and create a database.
but it's not work!

if i use mingw's vector tuple string memory... ,and create database too. it's work fine!
it's work fine.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by eranif »

Well, I dont have teh VC sdk, so cant test it

Once I will put my hands on it I will test it

Eran
Make sure you have read the HOW TO POST thread
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

Need VC's tag support.
Thanks!
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

CL 2.0 can't support too.
HOPE!
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by eranif »

Loaden wrote:CL 2.0 can't support too.
HOPE!
It can, it is probably matter of configuration - I will test it ( I got VS2008 on my laptop )
If I will find a "configuration" solution, I will post it here
Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by eranif »

As I suspected, only configuration.

To enable VC STL completion in codelite:
- From Settings -> Tags Settings ... -> Advanced, click on the [...] button to add new pre-processors, paste the following:

Code: Select all

_STD_BEGIN=namespace std{
_STD_END=}
__CLRCALL_OR_CDECL
- Next, add VC include paths to the parser include paths. Note: You can add them to the Workspace only or to the global parser, I will assume here that you want to add them to the global paths (shared between all workspaces):
from the menu 'Settings -> Tags Settings... -> Include Files'
Add the path where the STL files exist, for me it was:

Code: Select all

C:\Program Files\Microsoft Visual Studio 9.0\VC\include
Close the dialog, and perform a full-retag of the workspace (from the menu: 'Workspace -> Retag Workspace (full)')
For me it worked and completion started to work :P

Eran
Make sure you have read the HOW TO POST thread
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

Hi, i do it.
but this code is not work still.

Code: Select all

$include <iostream>
#include <string>
#include <vector>

using namespace std;
int main()
{
	std::string str;
	str. // here, not show anything.
}
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

Code: Select all

$include <iostream>
#include <string>
#include <vector>
#include <map>
#include <windows.h>

typedef std::vector<int> Vector;
using namespace std;
int main()
{
	Vector v;
	v.push_back(1); // OK!
	
	map<int, string> m;
	m.insert(make_pair(2, "okok")); // OK!
	
	// I want's use ::MessageBox
	::Mess // show nothing
}
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by eranif »

Loaden wrote:::Mess // show nothing
This bug is not related to the original topic, but it an old known bug that completion for global namespace is not supported
please file a bug report for this
Loaden wrote: std::string str;
str. // here, not show anything.
For some reason, codelite could not locate the definition of std::string.
I tried to have a look at the sources myself, and could not find it either

everything is there, except the typedef definition (typedef basic_string<char> string)

Typing

Code: Select all

std::basic_string<char> str;
str. 
Works fine
Make sure you have read the HOW TO POST thread
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

Code: Select all

$include <iostream>
#include <string>

using namespace std;

int main()
{
	std::basic_string<char> s;
	std::basic_string<wchar_t> ws;
	ws.npos // it's only show 'npos', not have other tip.
	
	return 0;
}
Post Reply