Thread: static linkage problem

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708

    static linkage problem

    I am trying to statically link via an obj file. The compiler warns of redefinitions of windows functions, pointing out that they are present in the project's .bss(assembly?) file as well as in the obj file I am linking to. How might I resolve this conflict?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    What compiler is this?

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Bloodshed Dev C++. I am trying to do away with writing dll's, and would like to be able to have a user simply link to a lib file, basically.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. uploading file to http server via multipart form data
    By Dynamo in forum C++ Programming
    Replies: 1
    Last Post: 09-03-2008, 04:36 AM
  2. internal/external linkage
    By MarkZWEERS in forum C++ Programming
    Replies: 1
    Last Post: 07-29-2008, 03:34 AM
  3. Using private class members in static functions
    By sethjackson in forum C++ Programming
    Replies: 2
    Last Post: 09-23-2005, 09:54 AM
  4. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 07:48 PM
  5. non static WndProc problem
    By aker_y3k in forum C++ Programming
    Replies: 14
    Last Post: 10-03-2002, 02:07 PM