This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can not run project.

Tags: None
(comma "," separated)
User avatar
KingCruzIII
Registered Member
Posts
7
Karma
0

Can not run project.

Thu Nov 30, 2017 5:39 am
Hi,
I am new to Kdevelop.
I may just be blind and incompetent, but I cannot figure out how to run my project.
I am using windows 10, KDE 5.2.1, and the MinGW compiler.
I can get it to compile. I am using the -G "MinGW Makefiles" extra argument.
When I click the execute button I get brought to the Launch config.
From what I have found I have to click on the + dropdown and select the last option which would be whatever my project name is.
It is grayed out for me so I cannot click on it, and if I try anything else like a compiled binary. I cannot get that to work either
Any help is appreciated!

Last edited by KingCruzIII on Thu Nov 30, 2017 8:43 pm, edited 1 time in total.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Can not run project.

Thu Nov 30, 2017 10:57 am
You should be able to click "Compiled binary", then select the path to your executable to the right. Does that not work?

Best,
Sven


I'm working on the KDevelop IDE.
User avatar
KingCruzIII
Registered Member
Posts
7
Karma
0

Re: Can not run project.

Thu Nov 30, 2017 8:50 pm
Now I am not so sure it actually compiles. I hit build and it says ***Finished***, but I cannot find what it would output like an a.out file or something. Where would it be?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Can not run project.

Thu Nov 30, 2017 11:12 pm
In your build folder, probably called something.exe or so ...


I'm working on the KDevelop IDE.
User avatar
KingCruzIII
Registered Member
Posts
7
Karma
0

Re: Can not run project.

Fri Dec 01, 2017 4:59 am
The only .exe are 2 a.exe files, and when I try to use those as binaries I get an error:
Code: Select all
E:/Kdevc++projects/Test/build/CMakeFiles/3.10.0/CompilerIdCXX> E:/Kdevc++projects/Test/build/CMakeFiles/3.10.0/CompilerIdCXX/a.exe
*** Failure: Exit code 312 ***

Also I just saw that it complained about having sh.exe in my MinGW folder. So I took that out but that didn't really change anything.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Can not run project.

Fri Dec 01, 2017 9:03 am
Try starting the .exe from the explorer ... it's probably missing some dll.


I'm working on the KDevelop IDE.
User avatar
KingCruzIII
Registered Member
Posts
7
Karma
0

Re: Can not run project.

Fri Dec 01, 2017 11:02 pm
when I run it from explorer it opens a cmd for a split second then disappears. It's just a hello world template program.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Can not run project.

Sat Dec 02, 2017 12:05 am
What's the program? Maybe it works as intended ...


I'm working on the KDevelop IDE.
geetamc
Registered Member
Posts
2
Karma
0

Re: Can not run project.

Sat Dec 02, 2017 3:39 am
Can you share your CMakeLists.txt?
Note when you hit build you should see something like:
[100%] Built target test
User avatar
KingCruzIII
Registered Member
Posts
7
Karma
0

Re: Can not run project.

Sat Dec 02, 2017 3:55 am
CmakeList:
Code: Select all
cmake_minimum_required(VERSION 2.6)
project(compiler)

add_executable(compiler main.cpp)

install(TARGETS compiler RUNTIME DESTINATION bin)


And it is just a program made from the Standard > Terminal > CMake C++ template
Code: Select all
std::cout << "Hello, world!" << std::endl;
geetamc
Registered Member
Posts
2
Karma
0

Re: Can not run project.

Sat Dec 02, 2017 4:18 am
Hm, I think I have figured out the cause.

Go to Settings -> Configure KDevelop -> CMake -> Default Generator and select "MinGW Makefiles".

Delete the whole build directory. (Which can be done by Project -> Prune Selection or by
navigating to your project directory using explorer and deleting it manually).

Build Again, there should be a "compiler.exe" (location: projectdir/build/compiler.exe, not hidden deep within the build dir!)
Set launch executable to that and report the results.

Cheers.
User avatar
KingCruzIII
Registered Member
Posts
7
Karma
0

Re: Can not run project.

Sat Dec 02, 2017 10:49 pm
I have changed it to the MinGW Makefiles option, but that doesn't seen to have done anything.
In the build view the bottom it first shows
Code: Select all
E:/Kdevc++projects/Compiler/build> "C:/Program Files/CMake/bin/cmake.exe" "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" "-DCMAKE_BUILD_TYPE=Debug" -G "MinGW Makefiles" -G "MinGW Makefiles" E:/Kdevc++projects/Compiler
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: E:/Kdevc++projects/Compiler/build
*** Finished ***


after that and I hit the build button it shows:
Code: Select all
E:/Kdevc++projects/Compiler/build> make -j8
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

E:\Kdevc++projects\Compiler\build>Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

E:\Kdevc++projects\Compiler\build>Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

E:\Kdevc++projects\Compiler\build>Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

E:\Kdevc++projects\Compiler\build>
*** Finished ***

Not sure if that helps at all.

I have tried reinstalling KDE, remaking the project with different settings. I have no idea why it won't work.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Can not run project.

Sat Dec 02, 2017 11:09 pm
That looks totally fine. What do you expect the program to do when you run it?


I'm working on the KDevelop IDE.
User avatar
KingCruzIII
Registered Member
Posts
7
Karma
0

Re: Can not run project.

Sat Dec 09, 2017 7:59 am
I expect when I hit Execute I don't get an error :
Code: Select all
*** Failure: E:/Kdevc++projects/Compiler/build/compiler has failed to start ***
E:/Kdevc++projects/Compiler/build> E:/Kdevc++projects/Compiler/build/compiler


Code: Select all
#include <iostream>

int main(int argc, char **argv) {
    std::cout << "Hello, world!" << std::endl;
    return 0;
}


that's the program. I'd expect to see "Hello World" somewhere not some error.

I expect something like what is shown in this video: https://www.youtube.com/watch?v=yx3Xw-OOcTk

Im not using unix and I understand its from 2015, but the UI looks pretty similar, and I do pretty much what the person in the video does.
Yet there is no Compiler.exe anywhere. The only .exe are two a.exe buried in some folders that just give errors if i use those.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Can not run project.  Topic is solved

Sat Dec 09, 2017 11:23 pm
Did you try running it from console? What happens there?


I'm working on the KDevelop IDE.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]