amir9480 / vscode-cpp-helper

vscode extension to create implementation for c++ function prototypes.

Home Page:https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.cpp-helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

not creating implementation in .cpp correctly

BazzalSeed opened this issue · comments

My file layout is simply like this
Screen Shot 2020-06-19 at 5 27 34 PM

I changed the settings to this
Screen Shot 2020-06-19 at 5 28 14 PM

You can see, even though i click on create implementation. It's creating all the implementations in place in stead of in .cpp.

bug_impl
Would appreciate your help

Hello @BazzalSeed

I'm not sure why this happening but I noticed you have an error in your JSON config.

[
...
"{FILE}.c",
]

You should remove the last comma in your array.
Fix it and if still issue exists please let me know.

I have the same issue, it seems to be happening when class is in a namespace

I'm having this same issue.

It seems like this happens when:

  • "CppHelper.SourceNotFoundBehavior": "Create source file" is set
  • The implementation .cpp file for the class already exists

So, to test, I made this header:

#ifndef CLASS_H
#define CLASS_H

class Test
{
public:
	void func1();
	void func2();
};

#endif  // CLASS_H

Using "Create Implementation" works for func1, but then creating the implementation for func2 afterwards will put it in the header file instead of the .cpp file.

@dstodev
Your information helped me a lot. Thank you.

@louis123456 @BazzalSeed

Please update to v0.2.2.