User forums > Using Code::Blocks

Cannot run a program compiled in Code Blocks ouside Code Blocks

(1/3) > >>

Radek:
I have a project under development which is in "almost usable" stage. When I add a new feature, I create a "release build" and copy it outside the project folder. Until now, the build behaved as expected and I was happy. Perhaps with the rev. 8500, the programs built in Code Blocks do not run outside Code Blocks any more. Symptoms:

- Inside Code Blocks, the program runs as expected.
- Copying the executable outside Codeblocks, double click - nothing happens.
- Trying to run from the command line. The executable is marked as executable in the "ls" listing. Running. Getting "bash: no such command".
- Trying the same with the "original" in the bin/Release and bin/Debug folders of the project. The same result.
- Checking access rights. Okay.
- Playing with the command completion TAB. It lists some applications starting with 'v' but not the 'viewer'.
- Running ClamAV. Only known "viruses" found. ClamAV marks encrypted PDFs as infected. The amount of "viruses" agrees, the "infected files" agree as well.
- Searching Code Blocks forum. Nothing usable has been found.

The executable seems to be linked somehow incorrectly. Code Blocks is able to run it but the operating system itself isn't for some unknown reason. The executable does not seem to be recognized as an executable. The problem is new, perhaps from the latest nighty build. The last "almost usable" build made with the previous version of Code Blocks worked for sure.

32-bit Debian 6, Code Blocks rev. 8500, Gnome.

oBFusCATed:
Does using something like "./myprogram" works?

Jenna:
That's for sure not a C::B error.
Can you provide a minimal projetrc, where it same happens ?

What does a simple console-project do ?

Radek:
I have recompiled a trivial console program which seems to run from the command prompt. At least, I haven't got the "command not found" frown. I recompiled another simple program which uses wxwidgets, like the not working "viewer" - and it does not run as well. The same symptom: "command not found". The problem seems to be related to wxwidgets projects.

On my comp: wxWidgets 2.8.12, shared library build, release build, downloaded as a package from a repository. It used to work all the time.

./viever crashes on GP fault (the segmentation fault).

Jenna:
If you run from commandline and the exe is not in the systems search path you need to specify the relative path.
If your are in the folder where the exe resides you need to run it with ./exename, otherwise you getthe error you described.
If the program segfaults when you run it this way, you either have a "real" programming error, or the program is linked against unusual libs, which are not found by the system, but are specified in the search path of your project, so it is used when running from inside C::B, but not from commandline (just a possible error).

Navigation

[0] Message Index

[#] Next page

Go to full version