new Dev-C++ installation on winXP - linker error problem

This is a discussion on new Dev-C++ installation on winXP - linker error problem within the Tech Board forums, part of the Community Boards category; I downloaded the Dev-C++ v.4.9.9.2 (installation package) after instalation (on Windows XP) created new C project Code: #include <stdio.h> #include ...

  1. #1
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424

    new Dev-C++ installation on winXP - linker error problem

    I downloaded the Dev-C++ v.4.9.9.2 (installation package)
    after instalation (on Windows XP)
    created new C project

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    int main(int argc, char *argv[])
    {
      getch();
      
      return 0;
    }
    compiled it and run ok

    changed the setting to support debug
    got the error
    "cannot find -lobjc"
    the makefile created by the Dev-C++ is
    Code:
    # Project: Project1
    # Makefile created by Dev-C++ 4.9.9.2
    CPP  = g++.exe -D__DEBUG__
    CC   = gcc.exe -D__DEBUG__
    WINDRES = windres.exe
    RES  = 
    OBJ  = main.o $(RES)
    LINKOBJ  = main.o $(RES)
    LIBS =  -L"C:/Dev-Cpp/lib"  -lobjc -g3 -fmessage-length=0 
    INCS =  -I"C:/Dev-Cpp/include" 
    CXXINCS =  -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include" 
    BIN  = hello.exe
    CXXFLAGS = $(CXXINCS)   -ansi -fexceptions -fverbose-asm -g3 -fmessage-length=0
    CFLAGS = $(INCS)   -ansi -fexceptions -fverbose-asm -g3 -fmessage-length=0
    RM = rm -f
    .PHONY: all all-before all-after clean clean-custom
    all: all-before hello.exe all-after
    
    clean: clean-custom
     ${RM} $(OBJ) $(BIN)
    $(BIN): $(OBJ)
     $(CC) $(LINKOBJ) -o "hello.exe" $(LIBS)
    main.o: main.c
     $(CC) -c main.c -o main.o $(CFLAGS)
    tried to roll back to default settings of the compiler - no change
    I found that -lobjc option can be disabled by the compiler option "Link an Objective C program" (don't know really what does it mean.
    Tried both settings ON/OFF but the make file is the same and the error stays

    searched forum and google - found nothing usefull

    searched lib folder of the Dev-C++ for files like *objc.* - nothing found.

    Any directions? Is it some cashing problem?
    Please
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  2. #2
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Code:
    getch();
    Hehe, where did you include a header file for getch(). Actually only Borland compilers support it.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  3. #3
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    actually - removed also a getch
    deleted the project - created it from streach - it worked

    but on each new project it seams as a random behaviour - I never know if option changes are applied or i should press compile 2-3 more times bore the dev acctually understands that I want the exe with debug info...
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  4. #4
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Had the same type problems. Didn't want to make a new Gcc, so I downloaded Code::Blocks. At least one of the developers from bloodshed made the Code::Blocks. I don't think that bloodshed is still in development, however, I could be mistaken. I know that there hasn't been a change to it in a long, long time.

  5. #5
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Didn't want to make a new Gcc, so I downloaded Code::Blocks.
    And what should that mean? When you download Dev-C++ you have to make your own GCC???
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  6. #6
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    uh...no...Generally you download, run the installer, then it works.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  7. #7
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Quote Originally Posted by maxorator
    And what should that mean? When you download Dev-C++ you have to make your own GCC???
    I'm guessing code::blocks is running a later version of gcc than is Dev-C++.

  8. #8
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Then you just install the right DevPak and you have the newest version
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  9. #9
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Quote Originally Posted by maxorator
    Then you just install the right DevPak and you have the newest version
    Hmmm, didn't know that something like that was available. Whenever I want a newer compiler I just hit gnu.org and start building the libs and gcc version I want. . . never occured to me that someone would have a prepackaged deal.

  10. #10
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Dev-C++ has built-in package management system and package downloader, just select the packages you want to install and press download. It will download and install them.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  11. #11
    Registered User
    Join Date
    Oct 2008
    Posts
    2
    Hi Vart
    Please if u have resolved the "cannot find -lobjc". Please can you let me know how. I have same issue. No object c linker option and pretty working code earlier. Thank you

  12. #12
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    Please don't revive old threads. If you have a question that is closely related to an existing one, create a new thread and place a link to the old one in there.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. linker error dev c++
    By manish_fra in forum C++ Programming
    Replies: 2
    Last Post: 12-11-2008, 10:07 AM
  2. Linker Problem with Dev C++
    By Brownie in forum C++ Programming
    Replies: 2
    Last Post: 09-26-2008, 07:18 AM
  3. Linker errors in Dev C++
    By tezcatlipooca in forum C++ Programming
    Replies: 12
    Last Post: 01-02-2007, 07:32 PM
  4. Dev C++ linker error: undefined reference
    By josh_d in forum Windows Programming
    Replies: 11
    Last Post: 03-11-2004, 10:58 AM
  5. WinXP Upgrade Installation Question
    By Troll_King in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-25-2001, 04:10 PM

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