Page 1 of 1

The project could not be actived

Posted: Wed Feb 07, 2018 6:52 am
by coot
Win10+CodeLite10.0.7

The workspace only has 1 project, but this project could not be actived. Even if I manually modified the workspace file, changed the Active="No" to "Yes", when I double click project, the value will change back to "No".
Whatever the Active is "Yes" or "No", in the tool bar, the compile/run button are disabled, but the debug button is enable. However, when I click debug button, CodeLite crash then. The error message show as attached.

the workspace file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="SDK_Test" Database="" Version="10.0.0">
  <Project Name="SDK_Test" Path="SDK_Test.project" Active="No"/>
  <BuildMatrix>
    <WorkspaceConfiguration Name="Debug" Selected="yes">
      <Environment/>
      <Project Name="SDK_Test" ConfigName="Debug"/>
    </WorkspaceConfiguration>
    <WorkspaceConfiguration Name="Release" Selected="no">
      <Environment/>
      <Project Name="SDK_Test" ConfigName="Debug"/>
    </WorkspaceConfiguration>
  </BuildMatrix>
</CodeLite_Workspace>
What should I do now? Thanks.

Re: The project could not be actived

Posted: Wed Feb 07, 2018 1:28 pm
by eranif
The crash is because there is no active project, its a side effect of the real problem: you don't have an active project.
What does the project file looks like? How did you get into this situation (did you manually change the .project/.workspace files?)

Re: The project could not be actived

Posted: Thu Feb 08, 2018 10:43 am
by coot
Yes, I guess it should be the issue. But the problem is I can not set this project as an active project. :cry:
I did not manually modify these two files, but this project has been included in another workspace. In that workspace everything is fine. Now I just want to open this project only. Then I met this issue.
the .project:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Project Name="Hi_SDK_CTest" Version="10.0.0" InternalType="">
  <Plugins>
    <Plugin Name="qmake">
      <![CDATA[00010001N0005Debug000000000000]]>
    </Plugin>
  </Plugins>
  <VirtualDirectory Name="HI_SDK">
    <VirtualDirectory Name="include">
      <VirtualDirectory Name="HI">
        <File Name="HI_SDK/include/HI/DataType.h"/>
        <File Name="HI_SDK/include/HI/HI.h"/>
        <File Name="HI_SDK/include/HI/HI_api.h"/>
        <File Name="HI_SDK/include/HI/HI_C.h"/>
        <File Name="HI_SDK/include/HI/HI_features.h"/>
      </VirtualDirectory>
    </VirtualDirectory>
  </VirtualDirectory>
  <VirtualDirectory Name="CTest">
    <VirtualDirectory Name="src">
      <File Name="CTest/src/CTest.h"/>
      <File Name="CTest/src/CTest.cpp"/>
    </VirtualDirectory>
  </VirtualDirectory>
  <Description/>
  <Dependencies/>
  <Settings Type="Executable">
    <GlobalSettings>
      <Compiler Options="" C_Options="" Assembler="">
        <IncludePath Value="."/>
      </Compiler>
      <Linker Options="">
        <LibraryPath Value="."/>
      </Linker>
      <ResourceCompiler Options=""/>
    </GlobalSettings>
    <Configuration Name="Debug" CompilerType="MinGW ( mingw64 )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
      <Compiler Options="-g" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
        <IncludePath Value="."/>
        <IncludePath Value="../ThirdParty/gtest/include"/>
        <IncludePath Value="HI_SDK/include"/>
      </Compiler>
      <Linker Options="-O0" Required="yes">
        <LibraryPath Value="."/>
        <LibraryPath Value="Debug"/>
        <Library Value="${CMAKE_CURRENT_LIST_DIR}/HI_SDK/lib/HI.lib"/>
        <Library Value="${CMAKE_CURRENT_LIST_DIR}/../ThirdParty/gtest/lib/libgtest.a"/>
      </Linker>
      <ResourceCompiler Options="" Required="no"/>
      <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="./bin" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
      <BuildSystem Name="CMake"/>
      <Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>">
        <![CDATA[]]>
      </Environment>
      <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="no">
        <DebuggerSearchPaths/>
        <PostConnectCommands/>
        <StartupCommands/>
      </Debugger>
      <PreBuild/>
      <PostBuild>
        <Command Enabled="yes">cp ${CMAKE_SOURCE_DIR}/HI_SDK/bin/*.dll ${CMAKE_SOURCE_DIR}/bin</Command>
      </PostBuild>
      <CustomBuild Enabled="no">
        <RebuildCommand/>
        <CleanCommand/>
        <BuildCommand/>
        <PreprocessFileCommand/>
        <SingleFileCommand/>
        <MakefileGenerationCommand/>
        <ThirdPartyToolName/>
        <WorkingDirectory/>
      </CustomBuild>
      <AdditionalRules>
        <CustomPostBuild/>
        <CustomPreBuild/>
      </AdditionalRules>
      <Completion EnableCpp11="no" EnableCpp14="no">
        <ClangCmpFlagsC/>
        <ClangCmpFlags/>
        <ClangPP/>
        <SearchPaths/>
      </Completion>
    </Configuration>
    <Configuration Name="x86 Debug" CompilerType="MinGW-W32 7.1.0" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
      <Compiler Options="-g -Wall" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
        <IncludePath Value="."/>
      </Compiler>
      <Linker Options="-O0" Required="yes">
        <LibraryPath Value="."/>
        <LibraryPath Value="Debug"/>
      </Linker>
      <ResourceCompiler Options="" Required="no"/>
      <General OutputFile="" IntermediateDirectory="./Debug" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="./Debug" PauseExecWhenProcTerminates="no" IsGUIProgram="no" IsEnabled="yes"/>
      <BuildSystem Name="Default"/>
      <Environment EnvVarSetName="<Use Workspace Settings>" DbgSetName="<Use Global Settings>">
        <![CDATA[]]>
      </Environment>
      <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="no">
        <DebuggerSearchPaths/>
        <PostConnectCommands/>
        <StartupCommands/>
      </Debugger>
      <PreBuild/>
      <PostBuild/>
      <CustomBuild Enabled="no">
        <RebuildCommand/>
        <CleanCommand/>
        <BuildCommand/>
        <PreprocessFileCommand/>
        <SingleFileCommand/>
        <MakefileGenerationCommand/>
        <ThirdPartyToolName/>
        <WorkingDirectory/>
      </CustomBuild>
      <AdditionalRules>
        <CustomPostBuild/>
        <CustomPreBuild/>
      </AdditionalRules>
      <Completion EnableCpp11="no" EnableCpp14="no">
        <ClangCmpFlagsC/>
        <ClangCmpFlags/>
        <ClangPP/>
        <SearchPaths/>
      </Completion>
    </Configuration>
  </Settings>
</CodeLite_Project>