gcc compiler doesnt know parameter

This is a discussion on gcc compiler doesnt know parameter within the C Programming forums, part of the General Programming Boards category; Hello I need to develop a program for school using glade, gtk+ and c. The assistents gave me the compile ...

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    115

    gcc compiler doesnt know parameter

    Hello

    I need to develop a program for school using glade, gtk+ and c.

    The assistents gave me the compile line that is the following :

    gcc -Wall -ansi -pedantic Todo.c -o Todo -export-dynamic `pkg-config --cflags --libs gtk+-2.0 libglade-2.0 `

    When i try to compile a testprogram i get this error.
    cc1: error: unrecognized command line option "-export-dynamic"

    I know the compile line is correct because a friend could compile with it.
    I have been looking for this error but i cant find it anywhere on the net.
    Does anyone has an idea? (I am on a mac)

    Thank you

  2. #2
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,651
    Perhaps, --export-dynamic?

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    115
    No tried that already. Then i get this error

    gcc -Wall -ansi -pedantic Todo.c -o Todo --export-dynamic `pkg-config --cflags --libs gtk+-2.0 libglade-2.0 `
    cc1: error: unrecognized command line option "-fexport-dynamic"

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,558
    export-dynamic is a linker option (and not one of the ones known to the compiler)

    Link Options - Using the GNU Compiler Collection (GCC)
    Use -Wl and read this as well
    Options - Untitled
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Feb 2010
    Posts
    115
    Thank you for your reply but i think this is not the same option as that i want to use

    my book says : the option export-dynamic is used so the libglade library can automatically link his callbackfunctions to a event.

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,558
    Read the description on the links I posted.

    The options don't exist just for the sake of one library.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. how to install gnu C compiler for Windows?
    By Amy N. in forum C Programming
    Replies: 2
    Last Post: 07-22-2009, 05:32 AM
  3. gcc compiler for windows?
    By td4nos in forum C Programming
    Replies: 8
    Last Post: 07-19-2009, 02:28 PM
  4. GCC compiler giving syntax error before 'double' error
    By dragonmint in forum Linux Programming
    Replies: 4
    Last Post: 06-02-2007, 05:38 PM
  5. gcc not for C++?
    By tin in forum C++ Programming
    Replies: 4
    Last Post: 09-15-2004, 08:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21