Results 1 to 3 of 3

Thread: Damn Linker Error

  1. #1

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024

    Angry

    My program compiles ok but then it starts to link and it goes downhill. Here is my problem I have 3 cpp and 3 .h files that all have to be linked together, but one .h file appears to be messing me up.

    Here is my main.h
    Code:
    #ifndef MAIN_H
    #define MAIN_H
    
    #include <windows.h>
    #include <io.h>
    #include <stdio.h>
    #include <commctrl.h>
    #include <initguid.h>
    
    #include "graphicscontroller.h"
    #include "gwmail.h"
    
    function delceration
    etc.
    
    #endif
    graphicscontroller.h
    Code:
    #ifndef GRAPHICSCONTROLLER.H
    #define GRAPHICSCONTROLLER.H
    
    #include "main.h"
    
    functions
    etc.
    
    #endif
    gwmail.h
    Code:
    #ifdef GWMAIL.H
    #define
    
    //Here is the troubled .h, it is a custome object for Novell GoupWise created by Novell
    #include <gwoapi.h>
    
    #include "main.h"
    
    Functions 
    etc.
    
    #endif
    When I go to compile it I get
    Main.Obj : Error Lnk2005: _CLSID_SHAREDNotification Already Defined In GraphicsControl.obj
    and on and on for all the objects in gwoapi.h then it will go through the entire set of Groupwise Objects for the gwmail.obj. So I get a total of 681 error.

    This is making me insane. If I have everything in one cpp and .h it works fine, but my functions are getting numerous and it would be cleaner if I could have many .cpp and .h

    Any ideas?

    Thanks
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Code:
    #ifdef GWMAIL.H
    #define
    
    //Here is the troubled .h, it is a custome object for Novell GoupWise created by Novell
    #include <gwoapi.h>
    
    #include "main.h"
    
    Functions 
    etc.
    
    #endif
    Try changing the first lines to:
    Code:
    #ifndef __GWMAIL_H__
    #define __GWMAIL_H__
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    That didnt work
    Any other ideas?
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width