Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: brainspoon on May 04, 2005, 03:09:37 am

Title: Problems with .exe
Post by: brainspoon on May 04, 2005, 03:09:37 am
And the party goes on.

I successfully compiled my first program, but now I can't execute the exe. Linux won't give me the right to execute it. I tried it with chmod but with no luck.

One other question I have is, why are the programs compiled as .exe and not as standard Linux binary?
Title: Problems with .exe
Post by: mandrav on May 04, 2005, 08:15:49 am
Quote
One other question I have is, why are the programs compiled as .exe and not as standard Linux binary?

It is a standard linux binary :)
Just the name contains the .exe part. You can remove the .exe in project properties.

Quote
Linux won't give me the right to execute it.

This is vague.

Please post the following:
How are you trying to execute it? From inside the IDE or from a shell?
If trying from a shell, what command do you give?
If from inside the IDE, which version are you using? Also, enable the Code::Blocks debug log and post its contents here, after you 've tried executing the program.

The more info you give, the more chances you 'll get a spot-on answer...

Yiannis.
Title: Problems with .exe
Post by: brainspoon on May 04, 2005, 10:45:48 am
I'll have to wait until today evening to try it again.
In the shell it said something like I have not the right to open that file. In the properties I saw that it was not allowed to execute it.
From within Code::Blocks I did not try it.
Title: Problems with .exe
Post by: David Perfors on May 04, 2005, 12:07:05 pm
Make sure you've got execute rights (ls- l should give at least 1 x) if you don't have it do chmod +x <program name>
To run the program you have to use the following (when the program is in a directory that isn't in the path) ./<program name>
Title: Problems with .exe
Post by: brainspoon on May 04, 2005, 02:35:50 pm
I already tried chmod but the changes are not applied even not with root rights.
Title: Problems with .exe
Post by: brainspoon on May 04, 2005, 08:49:49 pm
The file does not accept the execute attribute.
(The warning is in german)

[andreas@rendersklave Release]$ ./wxTest.exe
bash: ./wxTest.exe: Keine Berechtigung

[andreas@rendersklave Release]# chmod +x wxTest.exe
[andreas@rendersklave Release]# ls -l
insgesamt 184
-rw-rw-rw-  1 andreas root   859  4. Mai 02:50 stdwx.o
-rw-rw-rw-  1 andreas root 90348  4. Mai 02:50 wxTest.exe
-rw-rw-rw-  1 andreas root 96140  4. Mai 02:50 wxTest.o
Title: Problems with .exe
Post by: David Perfors on May 04, 2005, 11:52:24 pm
Could you try chmod with numbers? (chmod 755 wxTest.exe) perhaps that wil work
Title: Problems with .exe
Post by: brainspoon on May 05, 2005, 12:31:58 am
That made no difference.
Are there project settings that I am missing?

Maybe someone might give me a standard wxGtk Code::Blocks project and workspace that I can see if I am making something wrong
Title: Problems with .exe
Post by: Profic on May 05, 2005, 08:24:22 am
what filesystem do you use? seems some sort of fat/ntfs, if so just use real POSIX fs such as ext2(3), reiserfs, xfs, jfs
Title: Problems with .exe
Post by: mandrav on May 05, 2005, 09:39:20 am
I agree with Profic. It probably is a FAT32 filesystem which is mounted with the noexec flag. Remove this flag and remount the filesystem...

Yiannis.
Title: Problems with .exe
Post by: brainspoon on May 05, 2005, 11:11:32 am
Yeah u are my heroes :D
It was a shared windows drive. Now it works.
Title: Problems with .exe
Post by: brainspoon on May 05, 2005, 03:39:43 pm
So far so good. This are my next problems. Someone here who knows what might be wrong?

Linking console executable: Release/RpClientCmd.exe
/usr/lib/libwx_gtk_core-2.6.so: undefined reference to `wxObject::~wxObject()@WX_2.6'
/usr/lib/libwx_gtk_adv-2.6.so: undefined reference to `wxLongToLongHashMap_wxImplementation_HashTable::CopyNode(wxLongToLongHashMap_wxImplementation_HashTable::Node*)@WX_2.6'
/usr/lib/libwx_gtk_html-2.6.so: undefined reference to `wxGetTranslation(char const*)@WX_2.6'
/usr/lib/libwx_gtk_adv-2.6.so: undefined reference to `wxLongToLongHashMap_wxImplementation_HashTable::GetBucketForNode(wxLongToLongHashMap_wxImplementation_HashTable*, wxLongToLongHashMap_wxImplementation_HashTable::Node*)@WX_2.6'
/usr/lib/libwx_gtk_html-2.6.so: undefined reference to `wxFileSystem::wxFileSystem()@WX_2.6'
/usr/lib/libwx_gtk_qa-2.6.so: undefined reference to `wxFileName::wxFileName(wxString const&, wxString const&, wxPathFormat)@WX_2.6'
/usr/lib/libwx_gtk_adv-2.6.so: undefined reference to `wxLongToLongHashMap_wxImplementation_HashTable::DeleteNode(_wxHashTable_NodeBase*)@WX_2.6'
/usr/lib/libwx_gtk_adv-2.6.so: undefined reference to `wxLongToLongHashMap_wxImplementation_HashTable::GetOrCreateNode(wxLongToLongHashMap_wxImplementation_Pair const&, bool&)@WX_2.6'
collect2: ld gab 1 als Ende-Status zurück
Title: Problems with .exe
Post by: brainspoon on May 05, 2005, 03:49:12 pm
I got it. I had to remove all libs from the link libraries list except the wx_base-2.6