Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cbc not linking on windows with MS Visual Studio #26

Closed
svigerske opened this issue Mar 3, 2019 · 2 comments
Closed

cbc not linking on windows with MS Visual Studio #26

svigerske opened this issue Mar 3, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@svigerske
Copy link
Member

Issue created by migration from Trac.

Original creator: @jpfasano

Original creation time: 2007-08-01 21:02:21

Assignee: somebody

Version:

The Trunk version CoinSolve.cpp (cbcSolve project) does not link on window with MS Visual Studio Version 8. The link error is

------ Build started: Project: cbcSolve, Configuration: Release Win32 ------
Linking...
MyMessageHandler.obj : error LNK2005: "public: __thiscall MyMessageHandler::MyMessageHandler(void)" (??0MyMessageHandler`@``@`QAE`@`XZ) already defined in CoinSolve.obj
MyMessageHandler.obj : error LNK2005: "public: __thiscall MyMessageHandler::MyMessageHandler(class CoinMessageHandler const &)" (??0MyMessageHandler`@``@`QAE`@`ABVCoinMessageHandler`@``@``@`Z) already defined in CoinSolve.obj
MyMessageHandler.obj : error LNK2005: "public: virtual __thiscall MyMessageHandler::~MyMessageHandler(void)" (??1MyMessageHandler`@``@`UAE`@`XZ) already defined in CoinSolve.obj
MyMessageHandler.obj : error LNK2005: "public: virtual int __thiscall MyMessageHandler::print(void)" (?print`@`MyMessageHandler`@``@`UAEHXZ) already defined in CoinSolve.obj
MyMessageHandler.obj : error LNK2005: "public: __thiscall MyMessageHandler::MyMessageHandler(class MyMessageHandler const &)" (??0MyMessageHandler`@``@`QAE`@`ABV0`@``@`Z) already defined in CoinSolve.obj
MyMessageHandler.obj : error LNK2005: "public: class MyMessageHandler & __thiscall MyMessageHandler::operator=(class MyMessageHandler const &)" (??4MyMessageHandler`@``@`QAEAAV0`@`ABV0`@``@`Z) already defined in CoinSolve.obj
MyMessageHandler.obj : error LNK2005: "public: virtual class CoinMessageHandler * __thiscall MyMessageHandler::clone(void)const " (?clone`@`MyMessageHandler`@``@`UBEPAVCoinMessageHandler`@``@`XZ) already defined in CoinSolve.obj
.\Release/cbcSolve.exe : fatal error LNK1169: one or more multiply defined symbols found
Build log was saved at "file://d:\COIN\Coin-Cbc-All\trunk\Cbc\MSVisualStudio\v8\cbcSolve\Release\BuildLog.htm"
cbcSolve - 8 error(s), 0 warning(s)

It seems that this link problem was probably introduced on 7/31 with the change https://projects.coin-or.org/Cbc/changeset/715

To recreate:

  1. svn checkout https://projects.coin-or.org/svn/Cbc/trunk coin-Cbc-trunk

  2. open the file coin-Cbc-trunk/Cbc/MSVisualStudio/v8/Cbc.sln with
    visual studio C++ express edition.

  3. From the menu bar select "Build" - "Batch Build", and then rebuild
    everything.

@svigerske svigerske added bug Something isn't working component1 labels Mar 3, 2019
@svigerske
Copy link
Member Author

Comment by @jjhforrest created at 2007-08-02 13:09:22

Made conditional and changed to MyMessageHandler2

@svigerske
Copy link
Member Author

Comment by @jjhforrest created at 2007-08-02 13:09:22

Resolution: fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant