How to exclude some .CPP files from being linked in Visual Studio?

Discussion in 'C++' started by smart, Jan 26, 2010.

  1. smart

    smart Guest

    Hello everyone:

    I'm working with Visual Studio 2008, and I have multiple CPP files in
    the project. I'd like to compile these files, but not to link them,
    because they are all MATLAB interface functions with the same function
    names. Linking these functions cause the linker to complain, which is
    not a big problem. However, I still want to fix it. Is there any way
    to tell the linker to avoid certain object files?

    Thanks.
     
    smart, Jan 26, 2010
    #1
    1. Advertisements

  2. smart

    red floyd Guest

    Re: How to exclude some .CPP files from being linked in VisualStudio?

    On Jan 26, 8:58 am, smart <> wrote:
    > Hello everyone:
    >
    > I'm working with Visual Studio 2008, and I have multiple CPP files in
    > the project. I'd like to compile these files, but not to link them,
    > because they are all MATLAB interface functions with the same function
    > names.  Linking these functions cause the linker to complain, which is
    > not a big problem. However, I still want to fix it. Is there any way
    > to tell the linker to avoid certain object files?


    Wrong group. Questions about a specific toolset are better addressed
    in
    a forum dedicated to your platform. Please try a newsgroup with
    "visual
    studio" in it's name.

    See FAQ 5.9 http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9
     
    red floyd, Jan 26, 2010
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wh
    Replies:
    2
    Views:
    857
    Cowboy \(Gregory A. Beamer\)
    Jan 16, 2004
  2. DrUg13
    Replies:
    1
    Views:
    639
    DrUg13
    Feb 10, 2004
  3. Alex Vinokur
    Replies:
    7
    Views:
    676
    Greg Comeau
    Nov 15, 2004
  4. Thirumalai
    Replies:
    0
    Views:
    1,000
    Thirumalai
    May 22, 2006
  5. rockdale
    Replies:
    1
    Views:
    925
    Juan T. Llibre
    Aug 23, 2006
  6. xman
    Replies:
    1
    Views:
    888
    Victor Bazarov
    Aug 17, 2005
  7. Nathan Sokalski
    Replies:
    1
    Views:
    605
    Nathan Sokalski
    May 15, 2007
  8. Phil Johnson
    Replies:
    9
    Views:
    767
    Phil Johnson
    Jan 31, 2008
Loading...