News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

project with sfml :unable to run .exe

Started by skool daze, September 15, 2015, 10:50:30 AM

Previous topic - Next topic

skool daze

Hello, after reading a bit the wiki (recommend any tutorials?) I didn t found anything related to my annoying problem:    though the execution in the C::B 13.12 is OK, the .exe is only half a second active, with no proper image in the window.
I've been triyng with the options related to debug/release (project options) and of course put the *.dll in the same release directory, made sure everything is logic in search directories, compiler/linker directories   (the dll are for the non static, non debug version, and they are from the last SFML);   but all these fails.

What do you think am I mistaken?
Is it maybe a SFML related problem?    Many thanks!!.
Beginning with Code::Blocks

scarphin

Are you sure that is not a programming problem? To test this you can run the executable from the command line, if it still doesn't work then you have to check your code.

skool daze

#2
The O.S. is WinXP and it runs adequately my average DOS exes.
The problem is that executable only runs from the IDE, not "double-clicking" on it.
I´m working as possible solution the debug/release issue, but nothing so far.
Any doc about the debug/release?
Beginning with Code::Blocks

scarphin

Quote from: skool daze on September 15, 2015, 01:33:57 PM
The problem is that executable only runs from the IDE, not "double-clicking" on it.
Probably you don't have the required dlls in your system path for your executable to run from shell (cmd). First of all please try to copy the required dlls to where your executable is and try to run it from shell (cmd.exe) and check if it is working or not. If it's not working from shell then the problem is most likely a bug in your code. You can use 'dependency walker' to see what dlls your program require. Please use google if you need more information about dependency walker, system path, cmd.exe etc...

Debug and Release are targets with debug symbols enabled for the debug target and some optimizations enabled for the release target. They normally shouldn't effect your programs behavior.

BlueHazzard

Are you loading some external files? remember to copy also this files.... This is clearly no c::b or compiling problem, but something you are doing in your logic (probably loading some files)
I recommend to improve the error checking in your program

greetings...

skool daze

But whats the troubleshhoting for these cases?
Beginning with Code::Blocks

oBFusCATed

Use debugger. Printing to some log.
If it is a dll related problem, you can use the dependency walker to see which dlls are missing.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

skool daze

Thanks! And is the dependency walker an externa l app?
Beginning with Code::Blocks

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

skool daze

O.K.  and many thanks, oBFusCATed and stahta01; oh and I suppose stahta01, your signature link to the official wiki will help me with regards to the debug/release question if I make a thoroughly search...  ;)
Beginning with Code::Blocks

skool daze

Resuming:
Yes I know the most likely error is mine, not C::B fault (neither SFML's fault), but nonetheless, it puzzless me.
It's only a minimal test code with creation of window waiting to be closed with the minimal content, nothing more.
Nor it uses any external file other that the own *.dll's

I am thinking about the targets, it's the first time I code with that debug/release dichotomy

run it from shell --> no, it's GUI application

Also checked in "Build options...", dont touch Compiler Flags...or only the same checks for Release as Debug, in Linker settings>Link libraries ensure that the *.a's are in correct order (first graphics, then window, last system). Also in both options of Search directories (Compiler + Linker), ensure correct paths.

Maybe I missed something related to the possibility of static version?

Many thanks!
Beginning with Code::Blocks