Boost logo

Boost Users :

From: Tjernstrom, Staffan (stjernstrom_at_[hidden])
Date: 2008-07-21 23:25:07


Thank you very much indeed.

The missing /SUBSYSTEM: was indeed my problem.

This came about because I created the unit test projects as empty projects in VS, not MFC console projects.

Rgds

Staffan Tj.

Staffan Tjernström | Sr. Software Engineer - Market Data Systems | www.esignal.com
eSignal, Interactive Data Desktop Solutions (NYSE: IDC)
3955 Point Eden Way | Hayward, CA 94545-3720 | 510.723.1723 | FAX: 510.266.6100

-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of John C. Femiani
Sent: Sunday, 20 July, 2008 15:27
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [test] Fatal link error LNK1561: entry point must be defined when using boost.test

Ovanes Markarian wrote:
>
> The problem here is that you set to link against dynamic version of
> C++ runtime and you want boost to link against static version of boost
> lib. This will not work.
>
> Please select either another compilation switch (Project Properties /
> C++ / Code Generation) and choose there non-DLL version of runtime,
> like Multi-Threaded Library and not as currently Multi-Threaded
> Library DLL. This should change your compiler switch from /MD to /MT.
I dont think that is the problem because he is linking with libboost_unit_test_framework-vc80-mt-1_35.lib, and since there is no '-s' in the name, it links with MSVCRT, and it is selected by boost autolink when you use option /MD and and you are not compiling DEBUG code.

Plus, it works flawlessly on my system.

I _did_ notice a difference between our liker options; You don't have the subsystem set. When I throw together an msvc project I get this linker option:

/SUBSYTEM:CONSOLE

If I remove that option, I get:

1>LINK : fatal error LNK1561: entry point must be defined

Personally, I never even paid attention to it before (the defaults always worked for me), but I guess that is probably your problem.

open your project properties, and change Linker->System->SubSystem from [Not Set] to '/SUBSYSTEM:CONSOLE', or just manually add it to the command line and see if that works.

--John

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users

DISCLAIMER: This message (including any files transmitted with it) may contain confidential and / or proprietary information, is the property of Interactive Data Corporation and / or its subsidiaries and is directed only to the addressee(s). If you are not the designated recipient or have reason to believe you received this message in error, please delete this message from your system and notify the sender immediately. An unintended recipient's disclosure, copying, distribution or use of this message, or any attachments, is prohibited and may be unlawful.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net