Author Topic: CodeBlocks problems on Raspberry  (Read 319 times)

Offline gauthierlerouzic

  • Single posting newcomer
  • *
  • Posts: 7
CodeBlocks problems on Raspberry
« on: April 01, 2018, 04:52:37 pm »
Hi,
I expose my problems : Few years ago, I run on a old Raspberry Pi 2, CodeBlocks 10.05 on a old Raspbian.
I have write a program who run properly on it.
Few days ago I bought a new raspberry pi 3, and I install the last CodeBlocks on raspberry source.list.
It run properly, but when I open exactly the same projet who runs good in Raspberry pi 2, I can Compil, but when I want to run, I have this message in a pop up box:
"Can't Fin compiler executable in your configured search path's for Small Device C Compiler"

It's weird, because I don't use Small Device C, and I don't know what it is.

Let me know if you are any informations about that. Or maybe someone has a CodeBlocks 10.05 installer for raspberry ?

Really thank you for your time.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10736
    • Travis build status
Re: CodeBlocks problems on Raspberry
« Reply #1 on: April 01, 2018, 04:59:24 pm »
Are you using a project?
If you are: which compiler is selected in the project and the targets?

What do you mean by run?
Build -> Run?
Build -> Build and Run?
(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!]

Offline gauthierlerouzic

  • Single posting newcomer
  • *
  • Posts: 7
Re: CodeBlocks problems on Raspberry
« Reply #2 on: April 01, 2018, 05:11:16 pm »
Yes I use a codeblocks project.
the compiler select for the project is GNU GCC, and the target is /usr

the problem is when I Run the project. There is no problem when I build it.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10736
    • Travis build status
Re: CodeBlocks problems on Raspberry
« Reply #3 on: April 01, 2018, 05:13:30 pm »
The target is not /usr, this is the folder where C::B expects to find the compiler.
The target is something you add to your project.
You can see it in the Project -> Properties or Project -> Build options!

Can you post the log from building and running?
(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!]

Offline gauthierlerouzic

  • Single posting newcomer
  • *
  • Posts: 7
Re: CodeBlocks problems on Raspberry
« Reply #4 on: April 01, 2018, 06:19:13 pm »
Yes of course.
This is my Build and Run log :
Quote

-------------- Build: Release in genesis (compiler: GNU GCC Compiler)---------------

g++   -c /home/pi/TÚlÚchargements/genesis/main.cpp -o obj/Release/main.o
g++   -c /home/pi/TÚlÚchargements/genesis/ofSerial.cpp -o obj/Release/ofSerial.o
g++  -o bin/Release/genesis obj/Release/main.o obj/Release/ofSerial.o   /usr/lib/libcurl.so /usr/lib/libcurl-gnutls.so
Output file is bin/Release/genesis with size 29.55 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

-------------- Run: Release in genesis (compiler: GNU GCC Compiler)---------------

Checking for existence: /home/pi/TÚlÚchargements/genesis/bin/Release/genesis
Executing: xterm -T genesis -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. /home/pi/TÚlÚchargements/genesis/bin/Release/genesis  (in /home/pi/TÚlÚchargements/genesis/.)

I look the Project > Build Options, and There is Small Device selected, so I change it for GNU GCC and it's the same error.

This is the Xterm return when I run :
Quote
Process turned 0 (0x0) execution time : 0.004 s
Press ENTER to continue.
« Last Edit: April 01, 2018, 06:23:39 pm by gauthierlerouzic »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10736
    • Travis build status
Re: CodeBlocks problems on Raspberry
« Reply #5 on: April 01, 2018, 06:24:22 pm »
I don't see any error here?
Do you have xterm installed?
(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!]

Offline gauthierlerouzic

  • Single posting newcomer
  • *
  • Posts: 7
Re: CodeBlocks problems on Raspberry
« Reply #6 on: April 01, 2018, 06:25:59 pm »
yes Xterm is already installed on Raspbian.
it's crazy.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6160
    • My Best Post
Re: CodeBlocks problems on Raspberry
« Reply #7 on: April 01, 2018, 06:36:56 pm »
Can you post a full build log as in when you do rebuild or clean followed by build?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline gauthierlerouzic

  • Single posting newcomer
  • *
  • Posts: 7
Re: CodeBlocks problems on Raspberry
« Reply #8 on: April 01, 2018, 06:50:07 pm »
If I ReBuild the project, this is my build log :
Quote
-------------- Clean: Release in genesis (compiler: GNU GCC Compiler)---------------

Cleaned "genesis - Release"

-------------- Build: Release in genesis (compiler: GNU GCC Compiler)---------------

g++   -c /home/pi/TÚlÚchargements/genesis/main.cpp -o obj/Release/main.o
g++   -c /home/pi/TÚlÚchargements/genesis/ofSerial.cpp -o obj/Release/ofSerial.o
g++  -o bin/Release/genesis obj/Release/main.o obj/Release/ofSerial.o   /usr/lib/libcurl.so /usr/lib/libcurl-gnutls.so
g++: error: obj/Release/main.o: Aucun fichier ou dossier de ce type
g++: error: obj/Release/ofSerial.o: Aucun fichier ou dossier de ce type
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

But I take the two files in my archives, and put it in the folder obj/Release and it's good.
I don't know why, but every time I rebuild the project, the obj/Released files are deleted.

Really thank you for your time Tim!

Offline gauthierlerouzic

  • Single posting newcomer
  • *
  • Posts: 7
Re: CodeBlocks problems on Raspberry
« Reply #9 on: April 01, 2018, 07:07:25 pm »
the must weird thing is, when I delete the build, and I rebuild it, CodeBlocks make a new bin file, and this one call ttyACM0, but I modify the code with the new serial port (ttyUSB0). I already save the update. I have no more ttyACM0 informations on my code... I don't understand

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10736
    • Travis build status
Re: CodeBlocks problems on Raspberry
« Reply #10 on: April 01, 2018, 07:21:29 pm »
Keep in mind that it is good to set your locale for messages to some English locale, because C::B parses strings using regular expressions. If the parsing fails this might hide important messages from you.
And also the chance for a useful answer will raise, because more people understand English than the random language you might be using. (I'm also not a native English speaker).

But I take the two files in my archives, and put it in the folder obj/Release and it's good.
I don't know why, but every time I rebuild the project, the obj/Released files are deleted.
I'm not sure I understand what you're doing, but one thing is clear you're doing something you're not supposed to.
The files in the obj folder are managed by CodeBlocks, so when you do a Rebuild it deletes them.
They are supposed to be produced by the compiler during the build process.
If they are not there after the compiler has run then something is broken.
Try to run the commands in a terminal and see which one fails!
This might give you clues what is going on...

the must weird thing is, when I delete the build, and I rebuild it, CodeBlocks make a new bin file, and this one call ttyACM0, but I modify the code with the new serial port (ttyUSB0). I already save the update. I have no more ttyACM0 informations on my code... I don't understand
No idea what you're talking about, but this has nothing to do with CodeBlocks...

(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!]