Torna indietro   Hardware Upgrade Forum > Software > Programmazione

GIGABYTE GAMING A16, Raptor Lake e RTX 5060 Laptop insieme per giocare al giusto prezzo
GIGABYTE GAMING A16, Raptor Lake e RTX 5060 Laptop insieme per giocare al giusto prezzo
Il Gigabyte Gaming A16 offre un buon equilibrio tra prestazioni e prezzo: con Core i7-13620H e RTX 5060 Laptop garantisce gaming fluido in Full HD/1440p e supporto DLSS 4. Display 165 Hz reattivo, buona autonomia e raffreddamento efficace; peccano però le USB e la qualità cromatica del pannello. Prezzo: circa 1200€.
iPhone 17 Pro: più di uno smartphone. È uno studio di produzione in formato tascabile
iPhone 17 Pro: più di uno smartphone. È uno studio di produzione in formato tascabile
C'è tanta sostanza nel nuovo smartphone della Mela dedicato ai creator digitali. Nuovo telaio in alluminio, sistema di raffreddamento vapor chamber e tre fotocamere da 48 megapixel: non è un semplice smartphone, ma uno studio di produzione digitale on-the-go
Intel Panther Lake: i processori per i notebook del 2026
Intel Panther Lake: i processori per i notebook del 2026
Panther Lake è il nome in codice della prossima generazione di processori Intel Core Ultra, che vedremo al debutto da inizio 2026 nei notebook e nei sistemi desktop più compatti. Nuovi core, nuove GPU e soprattutto una struttura a tile che vede per la prima volta l'utilizzo della tecnologia produttiva Intel 18A: tanta potenza in più, ma senza perdere in efficienza
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 29-12-2012, 18:50   #1
Vincenzo1968
Bannato
 
Iscritto dal: Mar 2008
Città: Villabate(PA)
Messaggi: 2515
[C] Problema con GCC su Ubuntu

Ho il classico hello world in C:



Se lo compilo/linko con CodeBlocks è tutto OK. Mi crea l'eseguibile e, lanciandolo da terminale, mi stampa a video "Hello World".

Se tento una build con GCC da terminale ottengo il seguente errore del linker:

"/usr/local/bin/ld: this linker was not configured to use sysroots"



Why?


Vincenzo1968 è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 19:11   #2
Braccop
Senior Member
 
L'Avatar di Braccop
 
Iscritto dal: Jan 2002
Messaggi: 2689
hai installato build essentials dal package manager? pare cmq che quel compilatore in /usr/local non debba stare li', che sia stato installato a mano o da altro che non sono i repository ubuntu (codeblocks forse?)

fonte: http://ubuntuforums.org/showthread.php?p=11897544
__________________
Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders
Braccop è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 19:32   #3
Vincenzo1968
Bannato
 
Iscritto dal: Mar 2008
Città: Villabate(PA)
Messaggi: 2515
Si si ho installato build essentials ma il problema rimane.

Tutti i programmi(compreso CodeBlocks) li ho installati attraverso "Ubuntu Software Center" o apt-get dal terminale.
Non ho installato niente a mano.

Vincenzo1968 è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 19:44   #4
Vincenzo1968
Bannato
 
Iscritto dal: Mar 2008
Città: Villabate(PA)
Messaggi: 2515
ld fa parte del pacchetto binutils che ho installato tramite apt-get.

Quote:
ld --version
ld di GNU (GNU Binutils) 2.23.1
Copyright 2012 Free Software Foundation, Inc.
Questo programma è software libero; siete liberi di ridistribuirlo secondo i termini
della GNU General Public License versione 3 o (a scelta) una versione più recente.
Questo programma non ha assolutamente alcuna garanzia.


LD(1) GNU Development Tools LD(1)



NAME
ld - The GNU linker

SYNOPSIS
ld [options] objfile ...

DESCRIPTION
ld combines a number of object and archive files, relocates their data
and ties up symbol references. Usually the last step in compiling a
program is to run ld.

ld accepts Linker Command Language files written in a superset of
AT&T's Link Editor Command Language syntax, to provide explicit and
total control over the linking process.

This man page does not describe the command language; see the ld entry
in "info" for full details on the command language and on other aspects
of the GNU linker.

This version of ld uses the general purpose BFD libraries to operate on
object files. This allows ld to read, combine, and write object files
in many different formats---for example, COFF or "a.out". Different
formats may be linked together to produce any available kind of object
file.

Aside from its flexibility, the GNU linker is more helpful than other
linkers in providing diagnostic information. Many linkers abandon
execution immediately upon encountering an error; whenever possible, ld
continues executing, allowing you to identify other errors (or, in some
cases, to get an output file in spite of the error).

The GNU linker ld is meant to cover a broad range of situations, and to
be as compatible as possible with other linkers. As a result, you have
many choices to control its behavior.

OPTIONS
The linker supports a plethora of command-line options, but in actual
practice few of them are used in any particular context. For instance,
a frequent use of ld is to link standard Unix object files on a
standard, supported Unix system. On such a system, to link a file
"hello.o":

ld -o <output> /lib/crt0.o hello.o -lc

This tells ld to produce a file called output as the result of linking
the file "/lib/crt0.o" with "hello.o" and the library "libc.a", which
will come from the standard search directories. (See the discussion of
the -l option below.)

...
CUT
...

SEE ALSO
ar(1), nm(1), objcopy(1), objdump(1), readelf(1) and the Info entries
for binutils and ld.

COPYRIGHT
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled "GNU
Free Documentation License".



binutils-2.23.1 2012-11-13 LD(1)
Vincenzo1968 è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 20:24   #5
VICIUS
Senior Member
 
L'Avatar di VICIUS
 
Iscritto dal: Oct 2001
Messaggi: 11471
/usr/local/bin/ld? Ti sei compilato a mano binutils? Il messaggio di errore parla di una opzione sysroots che credo vada abilitata a compile time.
VICIUS è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 21:03   #6
Vincenzo1968
Bannato
 
Iscritto dal: Mar 2008
Città: Villabate(PA)
Messaggi: 2515
Ciao Vicius,

ho provato a ricompilare binutils con l'opzione --sysroot ma non riesco a compilare perché mi da sempre quell'errore.

Ma come m'è saltato in mente di installare binutils dai sorgenti? Ubuntu Software Center è tanto comodo!

Adesso cancello manualmente i file da /usr/local/bin. Poi tramite il Software Center mi disinstallo e reinstallo GCC 4.7.2.

Se incasino tutto pazienza: formatto e reinstallo sistema operativo e cavoli vari.

Che bel sabato sera!
Vincenzo1968 è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 21:10   #7
Braccop
Senior Member
 
L'Avatar di Braccop
 
Iscritto dal: Jan 2002
Messaggi: 2689
ecco ora capisci perche' era superfluo farsi troppi problemi sui requisiti dei vari software sotto linux?
__________________
Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders
Braccop è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 21:33   #8
Vincenzo1968
Bannato
 
Iscritto dal: Mar 2008
Città: Villabate(PA)
Messaggi: 2515
Risoltoooooooooooooooooooooooooooooooooooooo!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1



Vincenzo1968 è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 21:36   #9
Vincenzo1968
Bannato
 
Iscritto dal: Mar 2008
Città: Villabate(PA)
Messaggi: 2515
Quote:
Originariamente inviato da Braccop Guarda i messaggi
ecco ora capisci perche' era superfluo farsi troppi problemi sui requisiti dei vari software sotto linux?
Naaaaaaaaaa!!!!!!!

Si è trattato di un mio errore dovuto alla niubbaggine su Linux. D'ora in poi invece di smanettare sui sorgenti utilizzerò sempre Ubuntu Software Center o apt-get con i repository ufficiali di Ubuntu.

Vincenzo1968 è offline   Rispondi citando il messaggio o parte di esso
Old 29-12-2012, 21:45   #10
Vincenzo1968
Bannato
 
Iscritto dal: Mar 2008
Città: Villabate(PA)
Messaggi: 2515
Per il moderatore: è possibile aggiunge "[RISOLTO]" al titolo del thread in modo da agevolare la ricerca della soluzione agli utenti in rete?

Spiego come ho fatto:

Da terminale ci si connette come superutente. Ci si sposta nella cartella /usr/local/bin":

Codice:
cd /usr/local/bin
Si eliminano con il comando rm i seguenti file:

Codice:
rm addr2line
rm ar
rm as
rm c++filt
rm elfedit
rm gold
rm gprof
rm ld
rm ld.bfd
rm ld.gold
rm nm
rm objcopy
rm ranlib
rm readelf
rm size
rm strings
rm strip
Tramite Ubuntu Software Center si disinstalla GCC 4.7
Sempre tramite Ubuntu Software Center si reinstalla GCC 4.7.

Fine
Vincenzo1968 è offline   Rispondi citando il messaggio o parte di esso
Old 30-12-2012, 16:47   #11
Vincenzo1968
Bannato
 
Iscritto dal: Mar 2008
Città: Villabate(PA)
Messaggi: 2515
Quote:
Originariamente inviato da coffe_killer Guarda i messaggi
ti consiglio altresì di installarti kate come editor...codeblocks a volte è proprio controintuitivo...
http://www.hwupgrade.it/forum/showpo...36&postcount=1



Vincenzo1968 è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


GIGABYTE GAMING A16, Raptor Lake e RTX 5060 Laptop insieme per giocare al giusto prezzo GIGABYTE GAMING A16, Raptor Lake e RTX 5060 Lapt...
iPhone 17 Pro: più di uno smartphone. È uno studio di produzione in formato tascabile iPhone 17 Pro: più di uno smartphone. &Eg...
Intel Panther Lake: i processori per i notebook del 2026 Intel Panther Lake: i processori per i notebook ...
Intel Xeon 6+: è tempo di Clearwater Forest Intel Xeon 6+: è tempo di Clearwater Fore...
4K a 160Hz o Full HD a 320Hz? Titan Army P2712V, a un prezzo molto basso 4K a 160Hz o Full HD a 320Hz? Titan Army P2712V,...
Fotografia con AI: ecco Caria, la macchi...
PlayStation 6 vs Xbox Magnus: il rumor s...
DJI Osmo Action 4 a soli 208€ su Amazon:...
Irion, la data governance diventa strate...
EHang VT35: debutta in Cina il nuovo aer...
Cooler Master MasterLiquid Atmos II 360:...
Trapela in rete la roadmap dei nuovi gio...
In Germania la prima centrale solare gal...
Iliad lancia TOP 250 PLUS e TOP 300 PLUS...
UE: nuovi standard per i caricabatterie,...
Fine supporto Windows 10: breve guida pr...
Cyber Arena Tour: WINDTRE BUSINESS porta...
Addio Microsoft Word: la Cina sceglie WP...
Nano Banana si espande: l’AI di Google p...
Che fare con i Tesla Cybertruck invendut...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 14:30.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Served by www3v