Your program does not know anything about the cb project. So adding the PE to the project makes no difference for your application.
i don't think that this compiles
If you do not use any path then your program is searching in the same directory as it runs for other files. So if you put the executable "filename.exe" near your application it should be found by your program.
If you are running your program from codeblocks there is something special:
Your program does not search in the same folder as your application, but in the folder specified by Project->Settings->Build targets->Execution working dir
By default this is the same folder where the project file is located.
TL:DR:
If you run your application by double clicking, all relative paths start from the same directory as your exe is in.
If you run your application from within codeblocks, all relative paths start from the directory of the project file