Code Monkey home page Code Monkey logo

Comments (7)

frouse avatar frouse commented on August 23, 2024 1

I have been futzing with the suitesparse build. The reason why it does not build shared is that there are no symbols exported by dllexport. That is, the standard way on Windows to build shared objects is to decorate exported symbols with __declspec(dllexport). Windows does not create an export library (.lib) if there are no symbols exported from the dll. Hence no library file is created.

The standard cross platform way to do that is to define a MACRO that derives to __declspec(dllexport) on Windows but the empty string on UNIX. And to throw another wrinkle into the whole deal is that when building the export library, the decoration is dllexport. When importing the declaration (a different library), it is dllimport. The standard way of handling this is to define a MACRO (for instance FOOLib where FOO is the module) for Windows compilations that if it is defined, one decorates with dllexport. If the macro is not defined, the decoration is dllimport. Bottom line - it is a mess.

I am circling back to this problem - I was able to properly build suitespare on Win32 static and link it against modules compiled /MD. I am now doing this on Win64 and just forgot that building static can work.

The maintainers of the code should either drop 'SHARED' on Windows or properly decorate their external entry points, classes and structures for 'SHARED' on Windows. What is there now is confusing.

from suitesparse-metis-for-windows.

jlblancoc avatar jlblancoc commented on August 23, 2024

Hi YC,

I guess that before that error there were some others which prevented suitesparse_config.lib to be actually built, can you check it out please??

Anyway, compiling SuiteSparse as dynamic libs (.dll's) would require important changes in ALL function declarations, due to the different way in which Windows compilers handle them in comparison to Linux.

So, the scope of those changes are in my opinion out of the scope of this project, as they should be better done by Tim directly upstream for a better coordination of all the changes.

That said, this is not impossible to do, but I personally can't find time to do this at present, sorry!! :-)

from suitesparse-metis-for-windows.

ycollet avatar ycollet commented on August 23, 2024

Indeed, prevented suitesparse_config.lib has not been build, but prevented suitesparse_config.dll has been built.

I will try to use the static version of suitesparse with my project.

Yc

----- Mail original -----
De: "Jose-Luis Blanco-Claraco" [email protected]
À: "jlblancoc/suitesparse-metis-for-windows" [email protected]
Cc: "ycollet" [email protected]
Envoyé: Mercredi 10 Juin 2015 16:13:40
Objet: Re: [suitesparse-metis-for-windows] Windows shared build failed (#11)

Hi YC,

I guess that before that error there were some others which prevented suitesparse_config.lib to be actually built, can you check it out please??

Anyway, compiling SuiteSparse as dynamic libs (.dll's) would require important changes in ALL function declarations, due to the different way in which Windows compilers handle them in comparison to Linux.

So, the scope of those changes are in my opinion out of the scope of this project, as they should be better done by Tim directly upstream for a better coordination of all the changes.

That said, this is not impossible to do, but I personally can't find time to do this at present, sorry!! :-)


Reply to this email directly or view it on GitHub .

from suitesparse-metis-for-windows.

jlblancoc avatar jlblancoc commented on August 23, 2024

👍

from suitesparse-metis-for-windows.

chenhonghua avatar chenhonghua commented on August 23, 2024

@ycollet
Hi, ycollet :
I'v met some error when I compile suitesparse under Windows 7 64 bits with Visual studio 2013. Could you send me a compiled-already version ?

from suitesparse-metis-for-windows.

ycollet avatar ycollet commented on August 23, 2024

Hello,

I will be able to send you a Windows 7 64 / Visual 2012 version (not a 2013 one).
Is that OK for you ?

Best regards,

YC

----- Mail original -----
De: "chenhonghua" [email protected]
À: "jlblancoc/suitesparse-metis-for-windows" [email protected]
Cc: "ycollet" [email protected]
Envoyé: Jeudi 11 Juin 2015 07:49:28
Objet: Re: [suitesparse-metis-for-windows] Windows shared build failed (#11)

@ycollet
Hi, ycollet :
I'v met some error when I compile suitesparse under Windows 7 64 bits with Visual studio 2013. Could you send me a compiled-already version ?


Reply to this email directly or view it on GitHub .

from suitesparse-metis-for-windows.

chenhonghua avatar chenhonghua commented on August 23, 2024

@ycollet
Visual 2012 version will also work for me.
It's very kind of you. Thank you.
You can send to my Gmail ([email protected])

from suitesparse-metis-for-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.