Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to compile a program using its source code and I am unable too and the problem seems to happen in the same folder in every ocurrance, and when I check the files, they are all objective c language, could it be that I am missing libraries or programs? If so which may they be? I tried researching online and here but all I find is stuff on gcc and g++ but I already have both installed along with the boost library which is another pre-req for this program. Here are some of the command line outputs I got:

        "g++"    -o "phrase-extract/pcfg-score/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi/pcfg-score" -Wl,--start-group "phrase-extract/pcfg-score/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi/pcfg_score.o" "phrase-extract/pcfg-score/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi/main.o" "phrase-extract/pcfg-score/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi/tree_scorer.o" "phrase-extract/pcfg-common/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi/libpcfg_common.a"  -Wl,-Bstatic -lboost_program_options-mt -lboost_system-mt -lboost_thread-mt -Wl,-Bdynamic -lSegFault -lrt -Wl,--end-group -g -pthread 


...failed gcc.link phrase-extract/pcfg-score/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi/pcfg-score...
...skipped <p/home/rowe/Moses/bin>moses_chart for lack of <pmoses-chart-cmd/src/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>moses_chart...
...skipped <p/home/rowe/Moses/bin>moses for lack of <pmoses-cmd/src/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>moses...
...skipped <p/home/rowe/Moses/bin>lmbrgrid for lack of <pmoses-cmd/src/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>lmbrgrid...
...skipped <p/home/rowe/Moses/bin>CreateOnDiskPt for lack of <pOnDiskPt/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>CreateOnDiskPt...
...skipped <p/home/rowe/Moses/bin>queryOnDiskPt for lack of <pOnDiskPt/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>queryOnDiskPt...
...skipped <p/home/rowe/Moses/bin>pro for lack of <pmert/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>pro...
...skipped <p/home/rowe/Moses/bin>kbmira for lack of <pmert/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>kbmira...
common.copy /home/rowe/Moses/bin/processPhraseTable
...skipped <p/home/rowe/Moses/bin>processLexicalTable for lack of <pmisc/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>processLexicalTable...
common.copy /home/rowe/Moses/bin/queryPhraseTable
...skipped <p/home/rowe/Moses/bin>queryLexicalTable for lack of <pmisc/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>queryLexicalTable...
...skipped <p/home/rowe/Moses/bin>extract-ghkm for lack of <pphrase-extract/extract-ghkm/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>extract-ghkm...
...skipped <p/home/rowe/Moses/bin>pcfg-extract for lack of <pphrase-extract/pcfg-extract/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>pcfg-extract...
...skipped <p/home/rowe/Moses/bin>pcfg-score for lack of <pphrase-extract/pcfg-score/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi>pcfg-score...
common.copy /home/rowe/Moses/lib/libLM.a
...failed updating 12 targets...
...skipped 12 targets...
...updated 8 targets...
share|improve this question

closed as off-topic by karel, Whaaaaaat, Sylvain Pineau, Eric Carvalho, muru Sep 20 at 5:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – karel, Whaaaaaat, Sylvain Pineau, Eric Carvalho
If this question can be reworded to fit the rules in the help center, please edit the question.

    
See askubuntu.com/a/470928/158442 –  muru Sep 20 at 5:42
    

2 Answers 2

g++ compiles C++ code, what you are looking for is the GNU Objective-C++ compiler aka gobjc++ to compile Objective-C++ code, there is also the gobjc which is for Objective-C code.

sudo apt-get install gobjc++
share|improve this answer
    
that didn't make a difference I still get same error, could it be something more technical>? –  Brayan Hernandez Aug 2 '12 at 22:33
    
if you are getting this kind of issues open a new answer on programmers.stackexchange.com or stackoverflow.com , regarding Ubuntu this is the tool for your job. –  user827992 Aug 2 '12 at 22:36
    
The reason I posted here is because thats usually where they refer –  Brayan Hernandez Aug 3 '12 at 17:45

Assuming that file name is hellow.m, try

gcc hellow.m `gnustep-config --objc-flags` -lobjc -lgnustep-base -o hello   

or

gcc `gnustep-config --objc-flags` -Wl,--no-as-needed -lgnustep-base  filename.m -o   hello(as your wish)
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.