WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: C++ compiler issue  (Read 3046 times)

Offline nodeleaf

  • Newbie
  • *
  • Posts: 2
C++ compiler issue
« on: May 02, 2016, 05:25:03 AM »
I have installed gcc.tcz extension (version 5.3.0) on stable picore 7 then test it as follows:

Code: [Select]
include <stdio.h>

int main (){
    printf("Hello World\n");
    return 0;
}

Code: [Select]
$ g++ -o hello hello.cpp
g++: error trying to exec 'as': execvp: No such file or directory

I just don't get it: anything missing to have such a simple test compiled?


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: C++ compiler issue
« Reply #1 on: May 02, 2016, 05:46:37 AM »

I just don't get it: anything missing to have such a simple test compiled?

Yes. Binutils. Error message says can't execute as.

And many other packages if you are building a bit more complicated program. gcc is just a part of the toolchain. Install compile-essentials.tcz
« Last Edit: May 02, 2016, 06:09:39 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline nodeleaf

  • Newbie
  • *
  • Posts: 2
Re: C++ compiler issue
« Reply #2 on: May 02, 2016, 06:26:59 AM »
I had compile-essentials.tcz already installed but binutils.tcz was missing - now it compiles: thank you.



Offline tatemono

  • Newbie
  • *
  • Posts: 18
Re: C++ compiler issue
« Reply #3 on: May 17, 2016, 12:44:28 PM »
How about adding binutils.tcz to the dependency of compile-essentials.tcz?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: C++ compiler issue
« Reply #4 on: May 19, 2016, 01:56:51 AM »
How about adding binutils.tcz to the dependency of compile-essentials.tcz?

Thanks, done.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."