Thread: Linker errors with 2005 Express

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    204

    Linker errors with 2005 Express

    I've been trying for some hours now to compile a project called jucer. I'm using MSVC++ 2005 Express. I can build the project, but whenever I try to link it I get following error message:

    Code:
    Linking...
    jucelib_static_Win32_debug.lib(juce_String.obj) : error LNK2005: "public: __thiscall juce::String::String(void)" (??0String@juce@@QAE@XZ) already defined in juce_debug.lib(JUCE_debug.dll)
    I have a large number of "already defined in juce_debug.lib" errors. I'm near certain it is being caused by some setting in the 2005 Express IDE. Can anyone provide any suggest what might be giving me these errors?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Check the list of libraries being included
    project->settings->linker

    You're including two different builds of the juce 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.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    204

    Unhappy

    I'm not sure what I'm doing wrong. I have "E:\My System Files\juce\bin" and "..\..\..\bin\juce_debug.lib" listed in project > properties > linker > command line as is shown below:

    Code:
    /OUT:".\Debug/jucer.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Program Files\Microsoft 
    Visual Studio 8\VC\lib" /LIBPATH:"C:\Program Files\Microsoft Platform SDK for Windows Server 
    2003 R2\Lib" /LIBPATH:"E:\My System Files\juce\bin" /MANIFEST 
    /MANIFESTFILE:".\Debug\jucer.exe.intermediate.manifest" /DEBUG /PDB:".\Debug/jucer.pdb" 
    /SUBSYSTEM:WINDOWS /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib 
    "..\..\..\bin\juce_debug.lib"
    I'm not sure what juce_debug.lib is, nor how I could remove it from the list. I don't know if this is the right track either.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Do you have some #pragma in the source code (possibly hidden?) which also specifies the name of the library to be included?
    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.

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    204
    I have this:
    Code:
    #ifdef _MSC_VER
     #pragma warning (disable: 4100 4505)
    #endif

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to compile .c files with Visual C# Express 2005
    By daYz in forum Windows Programming
    Replies: 2
    Last Post: 02-22-2008, 10:37 AM
  2. No more links to visual C# 2005 express?
    By indigo0086 in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 02-03-2008, 11:46 AM
  3. MSVC++ 2005 Express Ed
    By swgh in forum C++ Programming
    Replies: 3
    Last Post: 04-05-2006, 06:08 PM
  4. Linker Errors in OpenGL
    By Sentral in forum Game Programming
    Replies: 2
    Last Post: 07-19-2005, 04:29 PM
  5. Linker errors - Multiple Source files
    By nkhambal in forum C Programming
    Replies: 3
    Last Post: 04-24-2005, 02:41 AM